3 out of 3 rated this helpful - Rate this topic

WM_DISPLAYCHANGE message

Applies to: desktop apps only

The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed.

A window receives this message through its WindowProc function.

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

Parameters

wParam

The new image depth of the display, in bits per pixel.

lParam

The low-order word specifies the horizontal resolution of the screen.

The high-order word specifies the vertical resolution of the screen.

Remarks

This message is only sent to top-level windows. For all other windows it is posted.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

See also

Painting and Drawing Overview
Painting and Drawing Messages
HIWORD
LOWORD

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
About MFC handler
How to handle this message at MFC code?
I did not find anything as "OnDisplayChange" handler.

I am working at Visual Studio 2008.
Return value
An application, returns 0 if it processes this message.