I already know about WS_EX_TOPMOST but that keeps my popup window on top of every other application too. Is there a simple setting/flag to keep it on top of just my apps windows?
Thanks
I already know about WS_EX_TOPMOST but that keeps my popup window on top of every other application too. Is there a simple setting/flag to keep it on top of just my apps windows?
Thanks
Have you looked at SetForegroundWindow() or SetActiveWindow()?
"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
Make your main app window the parent of the popup.
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss
Thanks for your replies.
All my child windows have the main app window as its parent.
I would like to avoid keeping an HWND list and running checks with GetNextWindow/SetForegroundWindow
I would also like to avoid setting/resetting styles in WM_ACTIVATEAPP/WM_SYSCOMMAND
Just hoping for something simple rather than another hack.
I meant... all my popups have the main as its parent.
I use several popups at a time though.
If your popups have the main window as their parent then they will be displayed above the parent. Isn't that what you're asking for? Is that not what you're seeing?
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss
All of my popups are on top of my main window (the parent).
One of them is flagged WS_EX_TOPMOST to be on top of all the others.
But, that flag makes it on top of every other app that is open.
Example... If I open IE to surf the web, that one flagged popup is on top of IE (unless my app is minimized).
So your original question is not very accurate. For what you want, some sort of "hack" is, I fear, inevitable.
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss
Yeh, I pretty much guessed after reading everything on Google that a hack would be my only solution.
Thanks anyway.