does anyone know how to make a window always on top?
Printable View
does anyone know how to make a window always on top?
Maybe check for WM_FOCUSCHANGED and counter with a BringWindowToTop(hwnd)? Not sure, though...
Call SetWindowPos(), specifying HWND_TOPMOST as the second parameter.
Also, try ORing the WS_EX_TOPMOST style to the first param you pass to CreateWindowEx()
>>Also, try ORing the WS_EX_TOPMOST style to the first param you pass to CreateWindowEx()<<
I was going to suggest that until I read (msdn):So it seems that:Quote:
WS_EX_TOPMOST Specifies that a window created with this style should be placed above all nontopmost windows and stay above them even when the window is deactivated. An application can use the SetWindowPos member function to add or remove this attribute.
>>Call SetWindowPos(), specifying HWND_TOPMOST as the second parameter.<<
Is probably the most complete/flexible answer. :)
thanks, that works