Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 4 - Window Manager / Window Manager Reference
Window Manager Routines / Moving Windows


MoveWindow

Use the MoveWindow procedure to move a window on the desktop.

PROCEDURE MoveWindow (theWindow: WindowPtr; 
                        hGlobal, vGlobal: Integer;
                        front: Boolean);
theWindow
A pointer to the window record of the window being moved.
hGlobal
The new location, in global coordinates, of the left edge of the window's port rectangle.
vGlobal
The new location, in global coordinates, of the top edge of the window's port rectangle.
front
A Boolean value specifying whether the window is to become the frontmost, active window. If the value of the front parameter is FALSE, MoveWindow does not change its plane or status. If the value of the front parameter is TRUE and the window isn't active, MoveWindow makes it active by calling the SelectWindow procedure.
DESCRIPTION
The MoveWindow procedure moves the specified window to the location specified by the hGlobal and vGlobal parameters, without changing the window's size. The upper-left corner of the window's port rectangle is placed at the point (vGlobal,hGlobal). The local coordinates of the upper-left corner are unaffected.

Your application doesn't normally call MoveWindow. When the user drags a window by dragging its title bar, you can call DragWindow, which in turn calls MoveWindow when the user releases the mouse button.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996