Which windows message follow WM_CREATE in the message loop? I have a procedure that needs to be called after the window is fully created. Placing this procedure in WM_CREATE doesn't wait for the window to be fully drawn.

So which is the first windows message where the window is guaranteed to be fully created?
Posted on 2002-05-21 09:33:56 by grv575
The window is fully created when WM_CREATE is called - it just isn't
visible yet. What do you need to do that requires window visibility?
Posted on 2002-05-21 09:59:04 by f0dder
If you try to draw an MCI Window on top of your main application window, it won't work until after wm_create.
Posted on 2002-05-21 10:50:51 by grv575
grv575,

Basically the WM_CREATE is processed when the CreateWindowEx() function is called but before it returns so it is an unusual case. WM_CREATE has nothing to do with the other messages in the WndProc style procedure. You always use the handle passed to the WndProc in a WM_CREATE message handler as the hWnd from the CreateWindowEx() does not yet exist as the function has not returned yet.

You can think of the WM_CREATE message as an extension of the CreateWindowEx() function.

Regards,

hutch@movsd.com
Posted on 2002-05-21 10:50:52 by hutch--
Ok, but it's still not working. I put a ShowWindow call at the end of wm_create right before I place the mciwindow on the main one. No go.

So short of using a timer which window message should I use to draw the mci window?
Posted on 2002-05-21 11:09:32 by grv575
Ah nevermind. You were right hutch. I was still using hWnd instead of hWin :rolleyes:
Posted on 2002-05-21 11:33:00 by grv575