- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Simular to the question of pmichael from Jul 1,2002 I got a problem in my QuickWin application using 'officially not allowed' modeless dialog boxes, which works just fine, so far. However when the user clicks on the Title Bar X of the dialog box, the window does not disappear like with the Cancel or OK button. I can intercept WM_COMMAND and call EXIT, but this ends only the doloop for the messages. Can I do anything to resolve this problem?
Thank you very much
W.Presser
Thank you very much
W.Presser
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One approach is to set a flag in a common block or module when the X button is pressed and put a test for this flag in your main loop and stop or call exit from there. Depending on your structure, you may need to modify things so the the test is done only ever tenth of a second or so, rather than continually ... i.e. avoid expending all the CPU time on doing the test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does your PROGRAM end with a message loop or is it located elsewhere? If the latter (which is my guess since I wouldn't expect such behaviour with the first approach), try intercepting WM_CLOSE of the main window and insert a PostQuitMessage there before calling CallWindowProc. That PostQuitMessage should cause secondary message loop to exit.
Just a guess, didn't try it myself.
Just a guess, didn't try it myself.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page