How to obtain the correct physical size of the monitor?

后端 未结 7 1371
闹比i
闹比i 2020-12-01 10:13

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         


        
7条回答
  •  情话喂你
    2020-12-01 10:24

    Windows Vista and upper support new function GetMonitorDisplayAreaSize() http://msdn.microsoft.com/en-us/library/ms775210%28VS.85%29.aspx

    Update: It doesn't work properly

提交回复
热议问题