Re: Win32Lib: Must be a Flag
- Posted by Don <eunexus at yahoo.com> Aug 11, 2004
- 466 views
> > If the only problem is flickering, add in the Windows style > > WS_CLIPCHILDREN to your parent. This (should) eliminate it. > > I couldn't implement that... but here's the code if you want to show me! :) > > include Win32Lib.ew > without warning > > constant Window1 = createEx( Window, "Window1", 0, Default, Default, 224, 197, > 0, 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 ) > showWindow(CWindow2,SW_MAX) > showWindow(CWindow2,SW_SHOWMAXIMIZED) > end procedure > setHandler( Window1, w32HResize, routine_id("Window1_onResize")) > > WinMain( Window1,Normal ) The flickering (in this case) is a combination of using showWindow and not using WS_CLIPCHILDREN. Use this one instead... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 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 ) -- showWindow(CWindow2,SW_MAX) -- showWindow(CWindow2,SW_SHOWMAXIMIZED) setRect( CWindow2, 0, 0, params[2], params[3], 1 ) end procedure setHandler( Window1, w32HResize, routine_id("Window1_onResize")) WinMain( Window1,Normal ) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\ Don Phillips - aka Graebel National Instruments mailto: eunexus @ yahoo.com