Skip to main content
gamedev.net
🔒 Locked

Windows dialog boxes

Started by GeniX 1 reply 300+ views
Original Post
GeniX
GeniX
Well - not quite (Note the below is written within the contect of MFC) When the user clicks a menu option, I get an OnMenuItem() call where MenuItem is the name of the menu item the user clicked on. My problem now is that I want to do some good ol'' calculating. If I pop up a system modal dialog and then do the calculating, and then close it -- I have the problem that the app doesnt update its display as it is not processing the message loop. Also I have the problem that the system modal window is now ALWAYS visible (even if you bring another app to foreground on windows). So I am now at wits end -- please someone tell me how I can achieve the following goals: a) do the processing without the user being able to click other options and such on the app b) have the "please be patient" window on top of the app''s , but not ''always on top'' c) both the "please be pateint" window, and the app must still update their displays when items are dragged across them. This kinda stuff is done all the time in other apps, and I reckon its probably quite good to know how to do it. regards, GeniX www.cryo-genix.net
Shannon Barber
Shannon Barber
Don't make it _system modal - just make it modal.

To really do it up nice, you need to use a worker thread - which is an involved operation.

Edited by - Magmai Kai Holmlor on December 6, 2001 8:36:51 PM
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
GeniX
GeniX
Thanks - I thought as much. But communication between the worker thread, and the parent window has proven hazardous in previous attempts.

I have done one instance where a worker thread is created in the DoModal of the popup dialog, but when the thread has to send a message to the popup telling that it has finished, and the popup must close, I sometimes get an assertion failure (or just an exception if release build)

Any comments on efficient communication between worker threads and their parent windows would be useful.


regards,

GeniX

www.cryo-genix.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.