BringWindowToTop()
SetActiveWindow()
SetWindowPos()
SetForefroundWindow()
我都试过了,好像都不行呀!

解决方案 »

  1.   

    ::SetWindowPos(AfxGetMainWnd()->m_hWnd,HWND_TOPMOST,-1,-1,-1,-1,SWP_NOMOVE | SWP_NOSIZE);先顶端然后再
    SetForefroundWindow()
      

  2.   

    试了以下,窗口是topmost了,
    但并没有active
    怎么办?
      

  3.   

    void WINAPI SwitchToThisWindow ( 
         HWND hWnd,    // Handle to the window that should be activated 
         BOOL bRestore // Restore the window if it is minimized 
    ); typedef void (WINAPI *LPSWITCHTOTHISWINDOW)(HWND, BOOL); LPSWITCHTOTHISWINDOW lpfnSwitchToThisWindow;lpfnSwitchToThisWindow = (LPSWITCHTOTHISWINDOW) GetProcAddress( GetModuleHandle(_T("user32")), _T("SwitchToThisWindow") ); 
      

  4.   

    ShowWindow(SW_RESTORE);
    SetWindowPos(&wndTopMost,0,0,0,0,SW_NOSIZE|SW_NOMOVE);