SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
请问一共能设置几个级别,比如说,我只是想让他在我得程序中是在最上面,当我得程序不被激活而其他应用程序激活时,其他应用程序把我的程序挡住,应该如何?能不能自己设置自己的对话筐的层次(多设几个覆盖的级别)。

解决方案 »

  1.   

    BOOL SetWindowPos(          HWND hWnd,
        HWND hWndInsertAfter,
        int X,
        int Y,
        int cx,
        int cy,
        UINT uFlags
    );
    其中:
    hWndInsertAfter:
    [in] Handle to the window to precede the positioned window in the Z order. This parameter must be a window handle or one of the following values.
    1、
    HWND_BOTTOM
    Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows.
    2、
    HWND_NOTOPMOST
    Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window.
    3、
    HWND_TOP
    Places the window at the top of the Z order.
    4、
    HWND_TOPMOST
    Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated.