【发布时间】:2014-05-07 14:34:15
【问题描述】:
我需要有关如何检索屏幕分辨率的帮助,如下图所示。
我找到了this documentation,它真的很有帮助。这是我根据这些文档尝试过的代码:
int numberOfScreens = GetSystemMetrics(SM_CMONITORS);
int width = GetSystemMetrics(SM_CXSCREEN);
int height = GetSystemMetrics(SM_CYSCREEN);
std::cout << "Number of monitors: " << numberOfScreens << "\n"; // returns 3
std::cout << "Width:" << width << "\n";
std::cout << "Height:" << height << "\n";
但是,它仅识别并提供有关 主 监视器的信息。如何获取有关其他显示器的信息?
【问题讨论】:
标签: c++ windows winapi multiple-monitors