Re: Message between WM_CREATE and WM_PAINT
Actually, it won't work. The problem is it uses SendMessage,
which is fine, but then CreateWindow repositions the new window
thus invalidating the move operation you just did.
I'd advise a PostMessage to yourself within WM_CREATE.
This posted message will be handled after CreateWindow has
finished, but before WM_PAINT is dispatched to the window
(unless somebody forcefully paints the window, which is rare).
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"Scott Seligman" <seligman@example.com> wrote in message
news:fjt3lt$bc0$1@panix5.panix.com...
"Lisa Pearlson" <no@spam.plz> wrote:
No it's not.. WM_CREATE is called BEFORE the window is created.. returning
(-1) in WM_CREATE actually cancels the windows creation.
Wrong. WM_CREATE is called before the window is shown, but before it
is displayed (if WS_VISIBLE is specified). If you return -1 the
window is destroyed before it's shown.
Or there is another reason why MoveWindow fails in WM_CREATE but succeeds
after that, like in WM_ACTIVATE
MoveWindow works in WM_CREATE.
--
--------- Scott Seligman <scott at <firstname> and michelle dot
net> ---------
Never do today what you can put off till tomorrow. Delay may give
clearer light as to what is best to be done.
-- Aaron Burr