-#if wxUSE_SCREEN_DPI
- HDC dc = ::GetDC(NULL);
- static const int ppInch = ::GetDeviceCaps(dc, LOGPIXELSY);
- ::ReleaseDC(NULL, dc);
-#else
+ // VZ: I'm reverting this as we clearly must use the real screen
+ // resolution instead of hardcoded one or it surely will fail to work
+ // in some cases.
+ //
+ // If there are any problems with this code, please let me know about
+ // it instead of reverting this change, thanks!
+#if 1 // wxUSE_SCREEN_DPI
+ const int ppInch = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
+#else // 0