I need one of my apps to stay on top
You can set it TopMost, like :
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
To set windows to foreground, apps like Task Manager use :
SwitchToThisWindow(hWnd, TRUE);
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I found that I can only setForegroundWindow() once. If I do it again it'll raise error.
I need one of my apps to stay on top and a mask (Qt Application) will be added on top of that window. The mask can actually be seen, but it does not respond to keyboard events.
I have tried SetFocus() and SetActive() neither of them worked.
Many thanks,
Christopher
I need one of my apps to stay on top
You can set it TopMost, like :
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
To set windows to foreground, apps like Task Manager use :
SwitchToThisWindow(hWnd, TRUE);