WM_DEVMODECHANGE message

The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
  HWND hwnd, 
  UINT  uMsg, 
  WPARAM wParam, 
  LPARAM lParam     
);

Parameters

hwnd

A handle to a window.

uMsg

WM_DEVMODECHANGE

wParam

This parameter is not used.

lParam

A pointer to a string that specifies the device name.

Return value

An application should return zero if it processes this message.

Remarks

This message cannot be sent directly to a window. To send the WM_DEVMODECHANGE message to all top-level windows, use the SendMessageTimeout function with the hWnd parameter set to HWND_BROADCAST.

Requirements

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

See also

Device Contexts Overview

Device Context Messages