This documentation is archived and is not being maintained.


Called to retrieve the user interface (UI) state for a window.

afx_msg UINT OnQueryUIState( );

Return Value

The return value is NULL if the focus indicators and the keyboard accelerators are visible. Otherwise, the return value can be one or more of the following values:

  • UISF_HIDEFOCUS   Focus indicators are hidden.
  • UISF_HIDEACCEL   Keyboard accelerators are hidden.
  • UISF_ACTIVE   Windows XP: A control should be drawn in the style used for active controls.


This member function emulates the functionality of the WM_QUERYUISTATE message, as described in the Platform SDK.

See Also

CWnd Overview | Class Members | Hierarchy Chart | CWnd::OnChangeUIState | CWnd::OnUpdateUIState