does anyone know how to make a window always on top?
This is a discussion on always on top within the Windows Programming forums, part of the Platform Specific Boards category; 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...
24bbs.cppCode:if( numeric_limits< byte >::digits != bits_per_byte ) error( "program requires bits_per_byte-bit bytes" );
Call SetWindowPos(), specifying HWND_TOPMOST as the second parameter.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
>>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: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.