Important: The information in this document is obsolete and should not be used for new development.
SelectWindow
Use theSelectWindowprocedure to make a window active. TheSelectWindowprocedure 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
TheSelectWindowprocedure 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,SelectWindowhas no effect.Even if the specified window is invisible,
SelectWindowbrings 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 callShowWindowimmediately to make the window visible (and accessible to the user).Call
SelectWindowwhen 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 callsSelectWindowto 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
SelectWindowandShowWindowtogether to restore a window's active, visible status after it has
been made invisible withHideWindow.