home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_07
/
EZTXPRO2.ZIP
/
BASIC_C.TUT
/
TUT33.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-09-09
|
921b
|
43 lines
DEFINT a-z
LIBRARY "gemaes","gemvdi"
'$option k50,y
'$include aes.bh
DIM mess(7) 'create message buffer
DIM SHARED junk
SUB WinMessage
SHARED mess()
STATIC message
message=mess(0)
SELECT CASE message
CASE WM_MOVED,WM_SIZED
junk=FNwind_set(mess(3),5,mess(4),mess(5),mess(6),mess(7))
CASE WM_REDRAW
WindowRedraw mess(3),mess(4),mess(5),mess(6),mess(7)
END SELECT
END SUB
SUB WindowRedraw(VAL win,VAL rx,VAL ry,VAL rw,VAL rh)
STATIC wx,wy,ww,wh,x,y,w,h
'obtain work area of window
junk=FNwind_get(win,4,wx,wy,ww,wh)
Intersection rx,ry,rw,rh,wx,wy,ww,wh,x,y,w,h
vs_clip 1,x,y,x+w-1,y+h-1
vsf_color 0
vr_recfl x,y,x+w-1,y+h-1
END SUB
WINDOW OPEN 1,"TestWindow",50,50,200,100,4095 'open a small window
DO
evnt_mesag VARPTR(mess(0))
IF mess(0)>=WM_REDRAW and mess(0)<=WM_MOVED THEN
CALL WinMessage
END IF
LOOP UNTIL mess(0)=WM_CLOSED
WINDOW CLOSE 1 'close the window