1. RE: Win32Lib bug: setClientRect
- Posted by Brian Broker <bkb at cnw.com> Sep 29, 2004
- 579 views
I wrote: > > > With just the status bar, the program below behaves as expected. But > when you add the menu, getClientRect does not show 400x300. > > }}} <eucode> > include win32lib.ew > without warning > > constant > Win = create( Window, "test", 0, Default, Default, 400, 300, 0 ), > Men = create( Menu, "Menu", Win, 0, 0, 0, 0, 0 ), > Stat = create( StatusBar, "Status", Win, 0, 0, 0, 0, 0 ) > > procedure openWin( integer self, integer event, sequence params ) > ? getCtlSize( Win ) > ? getClientRect( Win ) > setClientRect( Win, 400, 300 ) > ? getCtlSize( Win ) > ? getClientRect( Win ) > end procedure > setHandler( Win, w32HOpen, routine_id("openWin") ) > > WinMain( Win, Normal ) > </eucode> {{{ > > -- Brian > I think I see the issue now... getClientRect doesn't seem account for the menu on the first call (or the call in setClientRect), but it *does* account for it on the second call?? It seems to work correctly when I change w32HOpen to w32Activate, though. I still think this is a bug... -- Brian