How can I get the size of the display in centimeters or inches?
This code does not always works correctly:
HDC hdc = CreateDC(_T(\"DISPLAY\"),dd.Devi
You can request LOGPIXELSX from GetDeviceCaps to get the DPI for the display, though it will generally return 96. See also this MSDN article on writing DPI-aware apps.