GetSystemMetrics() returns wrong value for SM_CXSCREEN

后端 未结 3 1931
悲哀的现实
悲哀的现实 2020-12-03 18:05

I\'ve run into an interesting problem. At least in Vista, getSystemMetrics(SM_CXSCREEN) returns an incorrect value when the desktop DPI settings aren\'t set at 100%. For exa

3条回答
  •  孤街浪徒
    2020-12-03 18:40

    A program must tell the operating system that it is DPI-aware to get the true resolution when you go past 125%. That's best done with a manifest, as explained in this MSDN Library article.

提交回复
热议问题