I also find this GUI.xs method useful:
(place right after SetWindowLong)
    ###########################################################################
    # (@)METHOD:SetWindowPos(WINDOW,INSERTAFTER,X,Y,cx,cy,FLAGS)
    # The SetWindowPos function changes the size, position,
    # and Z order of a child, pop-up, or top-level
    # window. Child, pop-up, and top-level windows are
    # ordered according to their appearance on the
    # screen. The topmost window receives the highest rank
    # and is the first window in the Z order.
    #
    # INSERTAFTER - 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 integer values.
    #   HWND_BOTTOM
    #     Places the window at the bottom of the Z order. If
    #     the WINDOW parameter identifies a topmost window,
    #     the window loses its topmost status and is placed
    #     at the bottom of all other windows.
    #   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.
    #   HWND_TOP
    #     Places the window at the top of the Z order.
    #   HWND_TOPMOST
    #     Places the window above all non-topmost
    #     windows. The window maintains its topmost position
    #     even when it is deactivated.
BOOL
SetWindowPos(handle, insertafter = NULL, X = -1, Y = -1, cx = 0, cy =
0, flags = (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_FRAMECHANGED))
    HWND handle
    HWND insertafter
    int X
    int Y
    int cx
    int cy
    int flags
PREINIT:
    RECT myRect;
CODE:
    if ((X == -1) || (Y == -1)) {
      if(!GetWindowRect(handle, &myRect)) {
        XSRETURN_NO;
      } else {
        if (Y == -1)
          Y = (int) myRect.top;
        if (X == -1)
          X = (int) myRect.left;
      }
    }
    RETVAL = SetWindowPos(handle, insertafter, X, Y, cx, cy, flags);
OUTPUT:
    RETVAL


--
Reini Urban
http://phpwiki.org/
http://spacemovie.mur.at/   http://helsinki.at/

Reply via email to