-#if wxUSE_SCREEN_DPI
- HDC dc = ::GetDC(NULL);
- static const int ppInch = GetDeviceCaps(dc, LOGPIXELSY);
- ::ReleaseDC(NULL, dc);
-#else
- static const int ppInch = 96;
-#endif
+ // remember that 1pt = 1/72inch
+ const int ppInch = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);