I have to keep a dialog box visible until I take action to remove it. I have a full screen window with a couple of other dialog boxes on top. One of the dialoga is a child of the full screen window and behaves pretty well. The other is NOT a child of the full screen and ends up getting lost in the Z order. I can, and do, send messages to the creating thread to redisplay the dialog when I do something to hide it but it's a pain. I have to think there is a way to force a window to stay on top no matter what.
I really thought that LockSetForegroundWindow would do it but it doesn't.
Same general topic - When I came upon LockSet....... in the documentation I tried it but the compile failed. Couldn't seem to find the function or the defines that go with it. They are in WinUser.h as:
#if(_WIN32_WINNT >= 0x0500) // I had to manually #define this thing to get it to work.
WINUSERAPI // There has to be a better way!!!
#define ASFW_ANY ((DWORD)-1)
#define LSFW_LOCK 1
#define LSFW_UNLOCK 2
#endif /* _WIN32_WINNT >= 0x0500 */