$DEFINE GDI
$DEFINE USER
$DEFINE WINSTYLES
      INCLUDE 'WINDOWS.FI'

      FUNCTION InitFWClock(hInstance)
      IMPLICIT NONE
C
C Author       : Kevin B Black
C Date written : 23-Oct-1991
C Abstract     :
C
C Initializes window data and registers window class
C

      INTEGER*2 InitFWClock
      INTEGER*2 hInstance             ! Current instance

      INCLUDE 'WINDOWS.FD'
      EXTERNAL FWClockWndProc
      INCLUDE 'FWCLOCK.FD'

      RECORD /WNDCLASS/ WC

C
C Fill in window class structure with parameters that describe the
C main window. Register the FWClock window class.
C
      WC.STYLE=NULL                                 ! Class style(s).
      WC.lpfnWndProc=LOCFAR(FWClockWndProc)         ! Function to retrieve messages for
                                                    ! windows of this class.
      WC.cbClsExtra=0                               ! No per-class extra data.
      WC.cbWndExtra=0                               ! No per-window extra data.
      WC.hInstance=hInstance                        ! Application that owns the class.
      WC.hIcon=NULL                                 ! Icon is internal
      WC.hCursor=LoadCursor_A(NULL, IDC_ARROW)      ! Loads default cursor
      WC.hbrBackground=NULL
      WC.lpszMenuName=LOCFAR('FWClockMenu'C)        ! Name of menu resource in .RC file.
      WC.lpszClassName=LOCFAR('FWClockWClass'C)     ! Name used in call to CreateWindow.
      WC.style= CS_VREDRAW.OR.CS_HREDRAW.OR.CS_BYTEALIGNCLIENT
C
C Register the window class and return success/failure code.
C
      InitFWClock=RegisterClass(WC)
      RETURN
      END
