Win32Lib: minimize modal window/re-open/system hang
- Posted by Dan Moyer <DanMoyer at PRODIGY.NET> Nov 10, 1999
- 394 views
David, Have you had an opportunity to think about that "minimize modal window/re- open/system hang" problem I found? To refresh: if a user clicks on a button in my app to open a modal window, and then for no good reason goes down to the taskbar at the bottom of the screen & clicks on the small icon for that modal window, minimizing it, then goes back up to the button that opens the modal window & clicks on IT to bring back the window (instead of clicking again at the bottom icon), then closes the modal window, any next click in the main hangs the system. Since my app is math flash cards for kids, I'm worried that sooner or later they will hang their system. Below is a demo, made using your IDE :) Dan Moyer -- demo of modal window/minimize/re-open problem: include Win32Lib.ew without warning global constant TheWindow = create( Window, "The Window", 0, Default, Default, 780, 448+ 19, 0 ) global constant PushButton1 = create( PushButton, "Open Modal Window", TheWindow, 296, 356, 184, 64, 0 ) global constant LText2 = create( LText, "LText2", TheWindow, 109, 49, 600, 192, 0 ) global constant aModalWindow = create( Window, "MODAL WINDOW", TheWindow, 280,370,200,100,or_all({ WS_THICKFRAME, WS_SYSMENU})) constant Cr = { 13, 10 } ---------------------------------------------------------------------------- procedure TheWindow_onOpen () setText(LText2,"1. click OpenModalWindow button;" & Cr & "2. Go down to task bar and click on Modal windows icon to minimize it;" & Cr & "3. Now click AGAIN on the OpenModalWindow button to RE-OPEN it;" & Cr & "4. Now CLOSE the modal window;" & Cr & "5. NOW if you click anywhere in this main window, program will hang.") end procedure onOpen[TheWindow] = routine_id("TheWindow_onOpen") ---------------------------------------------------------------------------- procedure PushButton1_onClick () openWindow ( aModalWindow , Modal ) end procedure onClick[PushButton1] = routine_id("PushButton1_onClick") ---------------------------------------------------------------------------- WinMain( TheWindow, Maximize )