CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  界面

请问如何捕获屏幕分辨率改变的事件?

楼主ljh()2004-09-03 11:46:59 在 VC/MFC / 界面 提问

如题 问题点数: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

相关问题

  • 屏幕分辨率
  • 事件捕获
  • 如何改变屏幕的分辨率?
  • 如何取得屏幕的分辨率??
  • 关于屏幕分辨率的问题。
  • 如何得到屏幕的分辨率
  • 有谁会锁定屏幕分辨率?
  • 关于屏幕分辨率的大小?
  • 如何设回屏幕的分辨率?
  • 怎样得到屏幕的分辨率?

关键词

  • nt
  • word
  • displaychange
  • displaychangethe
  • resolution
  • sent
  • windowproc
  • lparam
  • wm
  • screen

得分解答快速导航

  • 帖主:ljh

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo