1. [WIN] bug in removeStyle?
- Posted by Brian Broker <bkb at CNW.COM> Jan 21, 2001
- 500 views
With the following example (program listed below), I will show how removeStyle is broken. First, see how Win1Style is the same as Win2Style, except that it doesn't have a minimize box. When you start the program, click 'Open Win2 Normal' button and compare the different styles. Next, close 'Win2' and click 'Open Win2 Modal'. Notice how the frame changes. Next, close 'Win2' again and press 'Open Win2 Normal' again. Notice how the frame is not the same as it was the first time. I noticed the removeStyle( id, WS_MINIMIZEBOX ) in 'openWindow' for Modal windows, so lets restart the program (to reset 'Win2' style) and click 'Open Win2 no min' button. You might expect it to look like Win1Style since we are only removing the WS_MINIMIZEBOX but it looks like it did when we tried to open it as Modal. I've stared at the removeStyle code for a while and I'm not seeing the problem. Anybody else care to explain this to me? Thanks, -- Brian ------------------------------------------- include win32lib.ew constant Win1Style = {WS_DLGFRAME,WS_SYSMENU}, Win2Style = {WS_DLGFRAME,WS_SYSMENU,WS_MINIMIZEBOX} constant Win1 = create( Window, "Win1", 0, Default, Default, 300, 200, Win1Style ), Win2 = create( Window, "Win2", Win1, Default, Default, 300, 200, Win2Style ), Btn1 = create( PushButton, "Open Win2 Normal", Win1, 5, 5, 100, 30, 0 ), Btn2 = create( PushButton, "Open Win2 Modal", Win1, 5, 40, 100, 30, 0 ), Btn3 = create( PushButton, "Open Win2 no min", Win1, 5, 75, 100, 30, 0 ) procedure onClick_Btn1() openWindow( Win2, Normal ) end procedure onClick[Btn1] = routine_id( "onClick_Btn1" ) procedure onClick_Btn2() openWindow( Win2, Modal ) end procedure onClick[Btn2] = routine_id( "onClick_Btn2" ) procedure onClick_Btn3() removeStyle( Win2, WS_MINIMIZEBOX ) openWindow( Win2, Normal ) end procedure onClick[Btn3] = routine_id( "onClick_Btn3" ) ----------------------- WinMain( Win1, Normal ) -----------------------
2. Re: [WIN] bug in removeStyle?
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Jan 22, 2001
- 473 views
Hi Brian, > With the following example (program listed below), I will show how > removeStyle is broken. It seems that when one removes the minimizebox from a window, Windows also decides to change the look of the frame. I will investigate further but at this stage I think the problem is not in win32lib. ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot)