Advertisement

What comes after WM_CREATE??

Started by November 07, 2000 11:47 AM
2 comments, last by Gaiiden 24 years, 1 month ago
Is thare another Windows message that I can use after WM_CREATE is done? I want to GDI text out to the screen, but if I use WM_CREATE, then the window hasn''t even been displayed yet! Is there a message I can use so I can do some initialization and display text on the window before I jump into the main event loop? WM_CREATE was perfect but.... damn ============================== "Need more eeenput..." - #5, "Short Circuit" ==============================

Drew Sikora
Executive Producer
GameDev.net

Well, if you do it just once on the initial draw then it will maybe flicker for a quarter of a second and then go to your main loop anyway. Perhaps the answer would be to have an "initial" state in your main loop so that until the user clicks, presses a button, runs out of time, etc, it will show the text you want.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Advertisement
Never assume that messages will come in any particular order. The order tends to change from version to version of Windows and your program dies.

You''ve got two options, the first is to have some flag that says that you''ve displayed your initial text and check this in your WM_PAINT handler. If it isn''t set then draw it otherwise do whatever your normally would.

Alternatively, after calling CreateWindow, call ShowWindow (or use WS_VISIBLE) and then UpdateWindow to force the window to get shown. Then you can use GetDC to get a DC and do whatever.

-Mike
WM_INITDIALOG?

comes after the gui stuff has been created, but before it has been displayed
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement