如题

解决方案 »

  1.   

    可以去msdn看一下setwindowpos这个函数
      

  2.   

    SDK:SetWindowPos(youHwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    MFC:SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
      

  3.   

    SetWindowPos(&wndTopMost,0,0,0,0,SWP_TOPMOST)
      

  4.   

    CWnd*pMainWnd=AfxGetMainWnd();
    pMainWnd->SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    恢复则
    pMainWnd->SetWindowPos(&wndNoTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
      

  5.   

    const CWnd * pWndInsertAfter;
    pWndInsertAfter = &wndTopMost;
    SetWindowPos(pWndInsertAfter,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),
    SWP_NOSIZE | SWP_NOMOVE);  //置于最顶端   
      

  6.   

    失去焦点后照样置于其他顶层窗口下面;SetWindowPos函数只是相对而已;操作系统不允许一个程序独占机器的控制权;