Re: tiny little question about win32lib
- Posted by Spock May 23, 2019
- 1386 views
Try this..
-- code generated by Win32Lib IDE v1.0.4 Build July-06-2008 constant TheProgramType="exw" include Win32lib.ew without warning constant win = createEx( Window, "DEMONSTRATION WINDOW", 0, Default, Default, 474, 326, 0, 0 ) constant pb_2 = createEx( PushButton, "QUIT", win, 20, 232, 124, 28, 0, 0 ) setFont( pb_2,"Arial",14,Normal+Bold) constant pb_1 = createEx( PushButton, "generate", win, 268, 232, 124, 28, 0, 0 ) setFont( pb_1,"Arial",14,Normal+Bold) procedure pb_2_onClick (integer self, integer event, sequence params) closeApp () end procedure setHandler( pb_2, w32HClick, routine_id("pb_2_onClick")) procedure draw (integer self, integer event, sequence params) setFont (win, "Consolas",12,Normal) wPuts({win,15,20},"Hello to the world, yet Again!") wPuts({win,15,40},"Now that text is on screen grab Window") wPuts({win,15,55},"Top bar & Move it so part of text") wPuts({win,15,70},"Leaves the monitor (off the edge)") wPuts({win,15,85},"Now, move it back to starting position.") wPuts({win,15,120},"Notice vanishing text AND unaffected control...") end procedure integer clicked = 0 procedure pb_1_onClick (integer self, integer event, sequence params) clicked = 1 draw(self, event, params) end procedure setHandler( pb_1, w32HClick, routine_id("pb_1_onClick")) procedure win_1_onPaint (integer self, integer event, sequence params) if clicked then draw(self, event, params) end if end procedure setHandler( win, w32HPaint, routine_id("win_1_onPaint")) WinMain( win,Normal )