home *** CD-ROM | disk | FTP | other *** search
- $DEFINE GDI
- $DEFINE USER
- $DEFINE WINMESSAGES
- INCLUDE 'WINDOWS.FI'
- SUBROUTINE RESIZE(hWnd2,NEWSIZE,SIZE)
- IMPLICIT NONE
- C
- C Author : Kevin B Black
- C Date written : 23-Oct-1991
- C Abstract :
- C
- C HANDLE RESIZING OF CLOCK WINDOW
- C
- C Subroutine to handle things that need to be dealt with when the window
- C is resized, before windows paints the paint message
- C
- INTEGER*2 hWnd2,NEWSIZE(2),SIZE
-
- LOGICAL L
- INCLUDE 'WINDOWS.FD' ! Include windows functions and parameters
- INCLUDE 'FWCLOCK.FD' ! Include FWclocks functions and parameters
- C
- C Set new clock size and tell Windows to post a repaint message
- C
- RCLOCK.LEFT=0
- RCLOCK.TOP=0
- WWIDTH=NEWSIZE(1)
- RCLOCK.RIGHT=WWIDTH
- WHEIGHT=NEWSIZE(2)
- RCLOCK.BOTTOM=WHEIGHT
- C
- C Kill current time and restart at an interval appropriate to whether the
- C window is open (every quater of a second) or iconic (once a second) when
- C FWClock changes between the two states.
- C
- L=SIZE.EQ.SIZEICONIC
- IF(IMANICON.XOR.L)THEN
- WSTATUS=KillTimer(hWnd2,MYTIMER)
- IF(IMANICON)THEN ! This is .NOT. the real state of affairs
- WSTATUS=SetTimer(hWnd,MYTIMER,200,0)
- ELSE
- WSTATUS=SetTimer(hWnd,MYTIMER,1000,0)
- ENDIF
- IF(WSTATUS.EQ.0)THEN
- CALL FatalAppExit(0,'FWClock: Failed to restart timer'C)
- STOP
- ENDIF
- IMANICON=.NOT.IMANICON
- ENDIF
- C
- C Cause windows to repaint the window
- C
- CALL UpdateWindow(hWnd2)
- RETURN
- END
-