Hey, how can I make my loading screen stay in the forground even if you maximize or restore another program after I open my program with the loading screen?
Printable View
Hey, how can I make my loading screen stay in the forground even if you maximize or restore another program after I open my program with the loading screen?
Post some code. You're most likely not handling WM_PAINT messages, or not redrawing your loading screen when your application recieves a WM_PAINT message.
The code is simple it just opens a dialog. There is no message handling or anything for the dialog cause i just want it to be displayed. All i want to do is keep the dialog in the forground.
Yes, I'm quoting myself :)Quote:
You're most likely not handling WM_PAINT messages, or not redrawing your loading screen when your application recieves a WM_PAINT message.
Well you need to handle WM_PAINT messages if you want your loading screen to be redrawn each time the window needs to be redrawn.Quote:
There is no message handling or anything for the dialog cause i just want it to be displayed.
ok, but what can I put in the WM_PAINT message to make it stay in the forground?
Use
SetWindowPos()
specify the style
HWND_TOPMOST
Thanks, I can't seem to find a function to tell me what the window pos is though, so I can leave the window in the same position. You wouldn't happen to know one would you? :)
use as the flags
SWP_NOSIZE|SWP_NOMOVE
Don't put this in the WM_PAINT.
Do it on init / create.
Sorry I did not realise that may be implied by the previous posts.