UI modal without being code modal?
The title is a bit contradictory but what I want to do is probably very common task: I need to display a simple dialog box to inform the user to wait while a process is working in the background. It would just be a window with text to the effect of "please wait, processing instruction....", no buttons or command menu, but my biggest obstacle is finding a way to display a message box that is both modal in that it stops the user from interacting with the main window, but also modeless in that it allows the thread to continue its background processing.
So far, I have come up with two possible solutions:
1) Create a modeless dialog box and at the same time disable the main window, re-enabling it and killing the dialog box after processing has completed.
2) Create a modal dialog box after creating a child thread to do the background processing, and then kill the dialog box after the child thread has completed.
The first seems a bit hack-ish and the second seems a bit overly complex (but maybe that's just because I haven't done much winapi threading) ... I'm wondering, is there a better way to display a dialog box while preventing user input without blocking the current thread?