见UNDOCUMENTED USER32函数
SwitchToThisWindow.具体过几天到
http://lu0.126.com
一看.

解决方案 »

  1.   

    你说的函数如果是在 16 bit Windows API 里面就对了,在 Windows 3.x 时代的函数,现在过时了WIN API 函数 ::SetForegroundWindow 把窗口拿到最前面
    BOOL SetForegroundWindow(
        HWND hWnd  // handle of window to bring to foreground
       );
    WIN API 函数 ::SetWindowPos 不但能把窗口拿到最前面,也能放到别的窗口后面,还能永远拿到最前面,谁也挡不住他,除非再次调用解除此命令,还能改变窗口的位置和大小,这些由参数uFlags选择你想用这个函数的那个功能或哪些功能
    BOOL SetWindowPos(
        HWND hWnd, // handle of window
        HWND hWndInsertAfter, // placement-order handle
        int X, // horizontal position
        int Y, // vertical position
        int cx, // width
        int cy, // height
        UINT uFlags  // window-positioning flags
       );