Re: Win32Lib: Must be a Flag
- Posted by Don <eunexus at yahoo.com> Aug 12, 2004
- 469 views
> it works like it's supposed to, EXCEPT for that brief flash when the > window is restored by the SW_MAX command... which I don't understand > at all why it does that. :/ Heres a (slightly) modified routine which is better than my first. I eliminated the flickering and it resizes properly. It gets the window border size from the system flags so it should be cross platform. Any problems just let me know...
include Win32Lib.ew without warning constant Window1 = createEx( Window, "Window1", 0, Default, Default, 224, 197, WS_CLIPCHILDREN, 0 ) constant CWindow2 = createEx( Window, "CWindow2", Window1, 8, 8, 200, 100, or_all({WS_CHILD}), 0 ) openWindow(CWindow2, Normal) procedure Window1_onResize (integer self, integer event, sequence params) --params is ( int style, int cx, int cy ) sequence lValues integer Border lValues = getWindowInfo( CWindow2, {WINDOWINFO_xWindowBorders} ) Border = lValues[1] setRect( CWindow2, -Border, -Border, params[2]+Border*2, params[3]+Border*2, 1 ) end procedure setHandler( Window1, w32HResize, routine_id("Window1_onResize")) WinMain( Window1,Normal )
Don Phillips - aka Graebel National Instruments mailto: eunexus @ yahoo.com