WM_CHANGEUISTATE Message Home
WM_CHANGEUISTATE Message

An application sends the WM_CHANGEUISTATE message to indicate that the user interface (UI) state should be changed.

Syntax

To send this message, call the SendMessage function as follows.
lResult = SendMessage(   hWndControl,           // (HWND) handle to destination control
   WM_CHANGEUISTATE,      // (UINT) message ID
   wParam,                // = () wParam; 
   lParam                 // = () lParam;
);

Parameters

wParam
The low-order word specifies the action to be taken. This member can be one of the following values.

UIS_CLEAR
The UI state flags specified by the high-order word should be cleared.
UIS_INITIALIZE
The UI state flags specified by the high-order word should be changed based on the last input event. For more information, see Remarks.
UIS_SET
The UI state flags specified by the high-order word should be set.

The high-order word specifies which UI state elements are affected or the style of the control. This member can be one or more of the following values.

UISF_HIDEACCEL
Keyboard accelerators are hidden.
UISF_HIDEFOCUS
Focus indicators are hidden.
UISF_ACTIVE
Windows XP: A control should be drawn in the style used for active controls.
lParam
Not used. Must be set to 0.

Return Value

No return value.

Remarks

A window should send this message to itself or its parent when it must change the UI state elements of all windows in the same hierarchy. The window procedure must let DefWindowProc process this message so that the entire window tree has a consistent UI state. When the top-level window receives the WM_CHANGEUISTATE message, it sends a WM_UPDATEUISTATE message with the same parameters to all child windows. When the system processes the WM_UPDATEUISTATE message, it makes the change in the UI state.

If the low-order word of wParam is UIS_INITIALIZE, the system will send the WM_UPDATEUISTATE message with a UI state based on the last input event. For example, if the last input came from the mouse, the system will hide the keyboard cues. And, if the last input came from the keyboard, the system will show the keyboard cues. If the state that results from processing WM_CHANGEUISTATE is the same as the old state, DefWindowProc does not send this message.

Message Information

HeaderDeclared in Winuser.h, include Windows.h
Minimum operating systems Windows 2000

See Also

Community Content

Value
Added by:Đonny
WM_CHANGEUISTATE = &H127
Enum WM_CHANGEUISTATE_low As Short
UIS_CLEAR = 2
UIS_INITIALIZE = 3
UIS_SET = 1
End Enum
Enum WM_CHANGEUISTATE_high As Short
UISF_HIDEACCEL = &H2
UISF_HIDEFOCUS = &H1
UISF_ACTIVE = 4
End Enum
Enum WM_CHANGEUISTATE As Integer
UIS_CLEAR = WM_CHANGEUISTATE_low.UIS_CLEAR
UIS_INITIALIZE = WM_CHANGEUISTATE_low.UIS_INITIALIZE
UIS_SET = WM_CHANGEUISTATE_low.UIS_SET
UISF_HIDEACCEL = CInt(WM_CHANGEUISTATE_high.UISF_HIDEACCEL) << 16
UISF_HIDEFOCUS = CInt(WM_CHANGEUISTATE_high.UISF_HIDEFOCUS) << 16
UISF_ACTIVE = CInt(WM_CHANGEUISTATE_high.UISF_ACTIVE) << 16
End Enum
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View