• 0

Get the x and y pixelsize of the screen?


Question

3 answers to this question

Recommended Posts

  • 0

If you're using the Win32 API, getting the size of the primary screen is simple:

int cx, cy;

cx = GetSystemMetrics(SM_CXSCREEN);
cy = GetSystemMetrics(SM_CYSCREEN);

printf("Resolution is %lix%li\n", cx, cy);

For more than one screen, you will need to traverse the devices with EnumDisplayDevices and get HORZRES/VERTRES of each screen with GetDeviceCaps.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.