剑痴乎

  • 首页
  • 文章分类
    • 音视频
    • WebRTC
    • 编程之美
    • Linux
    • Windows
    • 生活点滴
    • 校园生活
  • 参考
    • API参考
    • 实用工具
    • 测试音视频
    • 文档
  • 留言板
  • 关于
剑痴乎
代码为剑,如痴如醉
  1. 首页
  2. 编程之美
  3. 正文

Windows下获取当前屏幕分辨率

2015年6月10日 2261点热度 2人点赞 0条评论

Windows系统下通过winapi获取当前显示器屏幕分辨率VC示例代码:

HMONITOR monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
MONITORINFO info;
info.cbSize = sizeof(MONITORINFO);
GetMonitorInfo(monitor, &info);
int monitor_width = info.rcMonitor.right - info.rcMonitor.left;
int monitor_height = info.rcMonitor.bottom - info.rcMonitor.top;
本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可
标签: C++
最后更新:2015年11月20日

Jeff

管理员——代码为剑,如痴如醉

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

相关文章
  • 网络字节转换到本地字节的函数模板
  • MFC自绘带背景颜色标题栏
  • VC++获取本机IP地址
  • FLTK程序编译错误
  • C++实现windows重启

COPYRIGHT © 2025 jianchihu.net. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang