I found a solution as suggested by Iain. The other ways din't work: Here's the function that makes it : void CfrmImg::EnableStayOnTop(bool bDesktop) { // Desktop topmost if (bDesktop) { ::SetWindowLongPtr(m_hWnd, GWL_HWNDPARENT, NULL); ::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } // Application topmost else { if (::GetParent(m_hWnd)==NULL) ::SetWindowLongPtr(m_hWnd, GWL_HWNDPARENT, (LONG_PTR)frmMain->m_hWnd); ::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } } I recall this is for a modeless dialog - don't know if it makes sense for modals. The SetWindowLongPtr with GWL_HWNDPARENT parameter is a dirty hack. MSDN says SetParent should be used instead, but with SetParent it didn't work (I presume I have to change the windows style as suggested by MSDN - this is a later clean up work). At the moment I'm happy with my stay on top function. Thanks all for your assistance. Yarp http://www.senosoft.com/