What comes after WM_CREATE??
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
-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. ~
November 07, 2000 12:46 PM
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement