WM_THEMECHANGED message

Broadcast to every window following a theme change event. Examples of theme change events are the activation of a theme, the deactivation of a theme, or a transition from one theme to another.

#define WM_THEMECHANGED                 0x031A

Parameters

wParam

This parameter is reserved.

lParam

This parameter is reserved.

Return value

Type: LRESULT

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

Remarks

A window receives this message through its WindowProc function.

Note

This message is posted by the operating system. Applications typically do not send this message.

 

Themes are specifications for the appearance of controls, so that the visual element of a control is treated separately from its functionality.

To release an existing theme handle, call CloseThemeData. To acquire a new theme handle, use OpenThemeData.

Following the WM_THEMECHANGED broadcast, any existing theme handles are invalid. A theme-aware window should release and reopen any of its pre-existing theme handles when it receives the WM_THEMECHANGED message. If the OpenThemeData function returns NULL, the window should paint unthemed.

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Other Resources

CloseThemeData

IsThemeActive

OpenThemeData