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?
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 myselfYou'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.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
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
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?
Last edited by pinkcheese; 05-20-2002 at 12:17 AM.
use as the flags
SWP_NOSIZE|SWP_NOMOVE
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
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.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill