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 / Displaying Windows


ShowWindow

Use the ShowWindow procedure to make an invisible window visible.

PROCEDURE ShowWindow (theWindow: WindowPtr);
theWindow
A pointer to the window record of the window.
DESCRIPTION
The ShowWindow procedure makes an invisible window visible. If the specified window is already visible, ShowWindow has no effect. Your application typically creates a new window in an invisible state, performs any necessary setup of the content region, and then calls ShowWindow to make the window visible.

When you display a previously invisible window by calling ShowWindow, the Window Manager draws the window frame and then generates an update event to trigger your application's drawing of the content region.

If the newly visible window is the frontmost window, ShowWindow highlights it if
it's not already highlighted and generates an activate event to make it active. The ShowWindow procedure does not activate a window that is not frontmost on the desktop.

Note
Because ShowWindow does not change the front-to-back ordering of windows, it is not the inverse of HideWindow. If you make the frontmost window invisible with HideWindow, and HideWindow has activated another window, you must call both ShowWindow and SelectWindow to bring the original window back to the front.
SEE ALSO
See Listing 4-16 on page 4-60 for an example that temporarily hides a dialog box
window when the user closes it. See Listing 4-18 on page 4-64 for the example that
calls ShowWindow to display the window again later.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996