Important: The information in this document is obsolete and should not be used for new development.
SelectWindow
Use theSelectWindow
procedure to make a window active. TheSelectWindow
procedure changes the active status of a window but does not affect its visibility.
PROCEDURE SelectWindow (theWindow: WindowPtr);
- theWindow
- A pointer to the window's window record.
DESCRIPTION
TheSelectWindow
procedure removes highlighting from the previously active window, brings the specified window to the front, highlights it, and generates the activate events to deactivate the previously active window and activate the specified window. If the specified window is already active,SelectWindow
has no effect.Even if the specified window is invisible,
SelectWindow
brings the window to the front, activates the window, and deactivates the previously active window. Note that in this case, no active window is visible on the screen. If you do select an invisible window, be sure to callShowWindow
immediately to make the window visible (and accessible to the user).Call
SelectWindow
when the user presses the mouse button while the cursor is in the content region of an inactive window.SEE ALSO
See Listing 4-9 on page 4-44 for an example that callsSelectWindow
to change
the active window when the user presses the mouse button while the cursor is
in an inactive window.See Listing 4-18 on page 4-64 for an example that uses
SelectWindow
andShowWindow
together to restore a window's active, visible status after it has
been made invisible withHideWindow
.