Platform SDK: Windows User Interface

WM_SHOWWINDOW

The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
  HWND hwnd,       // handle to window
  UINT uMsg,       // WM_SHOWWINDOW
  WPARAM wParam,   // show flag (BOOL)
  LPARAM lParam    // status flag
);

Parameters

wParam
Specifies whether a window is being shown. If wParam is TRUE, the window is being shown. If wParam is FALSE, the window is being hidden.
lParam
Specifies the status of the window being shown. If lParam is zero, the message was sent because of a call to the ShowWindow function; otherwise, lParam is one of the following values.
Value Meaning
SW_OTHERUNZOOM The window is being uncovered because a maximize window was restored or minimized.
SW_OTHERZOOM The window is being covered by another window that has been maximized.
SW_PARENTCLOSING The window's owner window is being minimized.
SW_PARENTOPENING The window's owner window is being restored.

Return Values

If an application processes this message, it should return zero.

Remarks

The DefWindowProc function hides or shows the window, as specified by the message. If a window has the WS_VISIBLE style when it is created, the window receives this message after it is created, but before it is displayed. A window also receives this message when its visibility state is changed by the ShowWindow or ShowOwnedPopups function.

The WM_SHOWWINDOW message is not sent under the following circumstances:

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winuser.h; include Windows.h.

See Also

Windows Overview, Window Messages, DefWindowProc, ShowOwnedPopups, ShowWindow