I need help on how to retrieve the resolutions of my screens, as shown in the image below.
I found this documentation and it was really helpful. Here's the code that I tried, based on those docs:
int numberOfScreens = GetSystemMetrics(SM_CMONITORS);
int width = GetSystemMetrics(SM_CXSCREEN);
int height = GetSystemMetrics(SM_CYSCREEN);
std::cout << "Number of monitors: " << numberOfScreens << "
"; // returns 3
std::cout << "Width:" << width << "
";
std::cout << "Height:" << height << "
";
However, it only identifies and gives information about the main monitor. How do I get information about the other monitors?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…