Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ShowWindow

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function sets the specified window's show state.


BOOL ShowWindow( 
  HWND hWnd, 
  int nCmdShow 
); 

hWnd

[in] Handle to the window.

nCmdShow

[in] Specifies how the window is to be shown. The first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values.

Value Description

SW_HIDE

Hides the window and activates another window.

SW_SHOW

Activates the window and displays it in its current size and position.

SW_SHOWNA

Displays the window in its current state. The active window remains active.

SW_SHOWNORMAL

Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.

Nonzero indicates that the window was previously visible. Zero indicates that the window was previously hidden.

The first time an application calls ShowWindow, it should use the WinMain function's nCmdShow parameter as its nCmdShow parameter. Subsequent calls to ShowWindow must use one of the values in the given list, instead of the one specified by the WinMain function's nCmdShow parameter.

Calling PeekMessage before the top level window of an application is created will result in the window being created at the back of the z-order. You will need to explicitly call SetForegroundWindowto show the window when it is created after a call to PeekMessage. If the application already has a window in the foreground, then the new window will be created in the foreground.

Headerwinuser.h
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft