请教如何通过函数获得多显示器的分辨率

fsfsfs 2005-04-02 05:55:03
我的程序需要作多显示屏的扩展显示,所以需要找到除了主屏幕外的其他副屏幕的分辨率。请问各位高手该如何如何通过函数获得其他副屏幕的分辨率呢?
...全文
395 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
taianmonkey 2005-04-07
  • 打赏
  • 举报
回复
EnumDisplayMonitors
The EnumDisplayMonitors function enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers) that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a device context. EnumDisplayMonitors calls an application-defined MonitorEnumProc callback function once for each monitor that is enumerated. Note that GetSystemMetrics(SM_CMONITORS) counts only the display monitors.

BOOL EnumDisplayMonitors(
HDC hdc, // handle to display DC
LPCRECT lprcClip, // clipping rectangle
MONITORENUMPROC lpfnEnum, // callback function
LPARAM dwData // data for callback function
);
signoft 2005-04-05
  • 打赏
  • 举报
回复
收藏学习
pepsi1980 2005-04-05
  • 打赏
  • 举报
回复
列举全部硬件可以得到,或者读注册表:)
fsfsfs 2005-04-03
  • 打赏
  • 举报
回复
谢谢两位高手,获得分辨率的问题已解决。不过,如何通过函数得到一台计算机所安装的显示屏的个数呢?
柯本 2005-04-02
  • 打赏
  • 举报
回复
DEVMODE Mode;
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &Mode);
Mode.dmPelsWidth = 显示器的宽度
Mode.dmPelsHeight = 显示器的高度
Mode.dmDisplayFrequency = 显示器的刷新频率
oyljerry 2005-04-02
  • 打赏
  • 举报
回复
EnumDisplayEx枚举,然后GetDisplaySettings

2,643

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧