Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value of PixelsPerInch varying with windows themes?

In windows 7 environment, the value of PixelsPerInch varies while switching between Win7 and classic themes. Strangely, while having the current windows OS active on a 150% scale, in Win7 theme PixelsPerInch returns a value of 96.

The attached table will elaborate further.enter image description here

like image 907
Johny Avatar asked Jan 28 '15 13:01

Johny


1 Answers

Your application has not declared itself to be high DPI aware. As such, it is subject to DPI virtualization. That explains why 150% scaling gives a DPI of 96 when themed.

Why don't you get DPI of 96 when in the classic theme? Well, that's because DPI virtualization relies on DWM, and DWM is not active when you are using the classic theme.

I suspect that all of this is news to you. In which case you need to start by reading the MSDN topics that begin here: https://msdn.microsoft.com/en-us/library/windows/desktop/dd464646.aspx

like image 189
David Heffernan Avatar answered Oct 05 '22 23:10

David Heffernan