Is there a message that is sent to a window when it becomes visible?

What I want to do is make a window visible, and then carry out a few tasks, then kill it and return to the main window. It doesnt accept any input and just has some text.

The reson for this is that it says "Downloading..." and then when the download is complete it disappears.

Please HELP !!!

Posted on 2001-09-04 17:47:39 by skud

ShowWindow() is the API to use with either the SW_SHOW or SW_HIDE flags. Basically show it when you need it and hide it when you dont.

Posted on 2001-09-04 20:42:12 by hutch--
yeah, i tried waiting for the WM_INITDIALOG and then did:

invoke ShowWindow, hWin, SW_SHOW

then carried out the tasks and then did:

invoke EndDialog,hWin,0

it works, but the window is displayed but there is no text on it.
i have tried it with other controls and none of them show up.

What is going on in this crazeeeee world???
Posted on 2001-09-05 09:32:15 by skud
WM_SHOWWINDOW gets sent right before it becomes visible...that might be what you need
Posted on 2001-09-05 09:59:09 by Sloat
i need one that is sent JUST AFTER... so that i can carry out the operations while the window says "Please Wait..." or whatever, then when im done i can kill the window.

thanks anyway. ;)
Posted on 2001-09-05 10:03:48 by skud
I think the message you want is WM_WINDOWPOSCHANGED. I believe you should be able to check the Flags member of the WINDOWPOS structure pointed to by lParam for the existence of the SWP_SHOWWINDOW flag. Also, if you don't need WM_MOVE and WM_SIZE messages for anything else in your application (usually for lining up toolbars, status bars, etc.), you can just return zero instead of passing the message on to DefWindowProc.:alright:

Edit: Added a bit more information.
Posted on 2001-09-05 10:31:23 by Mike_C