Re: Default attributes in new Win32lib
- Posted by "R.Stowasser" <R.Stowasser at web.de> Aug 19, 2004
- 480 views
Derek Parnell wrote: > So in your example, don't call the event handler directly. Also you > don't need the call to repaintWindow() as it is done automatically > the first time the window is displayed. > > -- Derek Parnell Melbourne, Australia I have revised my example code once again. It has become very compact now. Thanks again for the help Derek. Regards, Roland -- code generated by Win32Lib IDE include Win32Lib.ew without warning -- Window Win constant Win = createEx( Window, "Window1", 0, 50, 50, 400, 300, 0, 0 ) constant BM = createEx( Bitmap, "Bitmap2", Win, 68, 44, 260, 172, 0, 0 ) setBitmap( BM,"largetiles.bmp") constant Edit = createEx( EditText,"Hello World",Win,4,156,144,32,0,0 ) setHint( Edit,"This is an EditText") setFont( Edit,"Arial",12,Normal+Bold) setBitmap( Edit,"largetiles.bmp") constant PB = createEx( PushButton, "Exit",Win, 268, 64, 104, 36, 0, 0 ) setFont( PB,"Arial",12,Normal+Bold) procedure Win_onActivate (integer self, integer event, sequence params) sequence result moveZOrder(BM,HWND_BOTTOM) setPenWidth(Win,3) drawLine(Win, 10,10,390,260) setFont(Win, "Arial", 10, Bold+Italic) result=drawText(Win,"Fourscore and twenty years ago, our fathers,...", {5,50, 140, 120}, DT_WORDBREAK, 4, 0, 0) end procedure setHandler( Win, w32HActivate, routine_id("Win_onActivate")) procedure PB_onClick (integer self, integer event, sequence params) closeWindow(Win) end procedure setHandler( PB, w32HClick, routine_id("PB_onClick")) WinMain( Win,Normal )