如题

解决方案 »

  1.   

    SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE)
      

  2.   

    楼上正解,MFC下的写法:SetWindowPos(&wndTopMost, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
      

  3.   

    SetWindowPos(&wndTopMost, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
      

  4.   

    对话框:属性More Style 系统形式勾上
      

  5.   

    在窗口的 OnInitDialog 函数中添加下面这行语句就可以使你的窗口总是位于最上层了:
    SetWindowPos(&wndTopMost, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
      

  6.   

    在窗口的 OnInitDialog 函数中添加:
    SetWindowPos(&wndTopMost, ....., SWP_NOMOVE|SWP_NOSIZE);
      

  7.   

    在OnInitDialog函数里添加:
    SetWindowPos(&wndTopMost,0,0,0,0,SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
      

  8.   

    BringWindowToTop(hWnd);
    SetActiveWindow(hWnd);