请问如何捕获屏幕分辨率改变的事件?
如题 问题点数:0、回复次数:6Top
1 楼DentistryDoctor(不在无聊中无奈,就在沉默中变态)回复于 2004-09-03 11:56:16 得分 0
WM_DISPLAYCHANGE
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, // handle to window
UINT uMsg, // WM_DISPLAYCHANGE
WPARAM wParam, // image depth
LPARAM lParam // screen resolution
);
Parameters
wParam
Specifies 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
Windows NT/2000/XP: Included in Windows NT 4.0 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winuser.h; include Windows.h.
See AlsoTop
2 楼lixia0san(冒*小三*牌)回复于 2004-09-03 11:59:05 得分 0
WM_DISPLAYCHANGE
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, // handle to window
UINT uMsg, // WM_DISPLAYCHANGE
WPARAM wParam, // image depth
LPARAM lParam // screen resolution
);
Parameters
wParam
Specifies 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.
具体请看msdnTop
3 楼BestBear(天外飞熊)回复于 2004-09-03 12:24:12 得分 0
<Windows程序设计>上有讲Top
4 楼jmlt1983(Harper)回复于 2004-09-03 18:56:10 得分 0
msdn上的
都说了
我就不说了Top
5 楼skyman2000(skyman)回复于 2004-09-07 13:01:09 得分 0
int winWidth = GetSystemMetrics(SM_CXFULLSCREEN);
int winHeight = GetSystemMetrics(SM_CYSCREEN)Top
6 楼kexuejia(小科)回复于 2004-09-07 16:45:27 得分 0
::GetSystemMetrics(SM_CXSCREEN)//宽
::GetSystemMetrics(SM_CYSCREEN)//高Top




