Archived

This topic is now archived and is closed to further replies.

Floru

Topmost window and focus whole time (win32)

Recommended Posts

Floru    124
Hi! How do I handle my program''s window so that is has the focus all the time? I managed to modify my window so that it is the topmost window all the time with SetWindowPos() but still other windows can get the focus. Thanks Floru

Share this post


Link to post
Share on other sites
Nytegard    839
This should do what you need. Just put it in the windows WNDPROC.

  
case WM_ACTIVATE:
switch(LOWORD(wParam)){
case WA_INACTIVE:
SetActiveWindow(hwnd);
SetFocus(hwnd);
break;
}
break;

Share this post


Link to post
Share on other sites