如题

解决方案 »

  1.   

    SetWindowPos(pWnd-> GetStyle( ) &WS_EX_TOPMOST)?
                  &wndNoTopMOST: &wndTopMost,0,0,0,0,SSP_NOSIZE|WSP_NOMOVE);
      

  2.   

    SetWindowPos(&wndTopMost,0,0,0,0,SSP_NOSIZE|WSP_NOMOVE);
      

  3.   

    BOOL SetWindowPos(          HWND hWnd,
        HWND hWndInsertAfter,
        int X,
        int Y,
        int cx,
        int cy,
        UINT uFlags
    );....A window can be made a topmost window either by setting the hWndInsertAfter parameter to HWND_TOPMOST and ensuring that the SWP_NOZORDER flag is not set, or by setting a window's position in the Z order so that it is above any existing topmost windows. When a non-topmost window is made topmost, its owned windows are also made topmost. Its owners, however, are not changed. 
      

  4.   

    BOOL CTestApp::InitInstance()
    { ...
    m_pMainWnd->SetWindowPos(&m_pMainWnd->wndTopMost, 0, 0, 0, 0, 
    SWP_NOACTIVATE | SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
    return TRUE;
    }