Intended for comp.os.ms-windows.programmer.misc newsgroup.
HELP! This ones driving me crazy. Ok, I create a child window of class
PauseWindow (which I defined), and which does nothing more than display a
static control in the middle that says "Please wait." Real simple,
right. Ok, so once the window is displaying that static, the program is
supposed to post a user defined message which calls a function that sorts an
array, blah, blah, blah. The way I have this setup is at the end of
PauseChild_OnCreate, there is a "PostMessage(GetParent(hwnd),WM_SORT,0,0)"
where WM_SORT is my message, and the GetParent(hwnd) thing yeilds a handle
to the main window. But the problem is that the message is being send
before the child window is being drawn, the result being that there is an
empty white square on the screen while the 60-second sort goes on, and its
message is only displayed to the user once the sort is through, by which
time it is time to close the window anyway. If anybody knows a way to
cause a message NOT to be processed until the static control in the center
of a child window is drawn, PLEASE TELL ME! Or, if you have some working
code to illustrate this, please post it. Thanks.