Page 1 of 1

WinVista/7 Changed dpi Tips

Posted: Wed Jan 11, 2012 10:51 pm
by oryaaaaa
I checked Win7 JP 32bit. for gadget, menu and 2D drawing.

Code: Select all

Procedure.i Gui_GetDesktopDpiX() 
  Protected hdc.i
  Protected hDpi.i 
  hdc = GetDC_(GetDesktopWindow_())
  If hdc
    hDpi = GetDeviceCaps_(hdc, #LOGPIXELSX)
    ReleaseDC_(GetDesktopWindow_(), hdc)
  EndIf
  ProcedureReturn hDpi
EndProcedure

Global ScreenDpi.f
ScreenDpi = 96/Gui_GetDesktopDpiX()

FontID1 = LoadFont(1, "FONT", Round(18*ScreenDpi, #PB_Round_Nearest))

Re: WinVista/7 Changed dpi Tips

Posted: Wed Jan 11, 2012 10:58 pm
by IdeasVacuum
Great tip!

Re: WinVista/7 Changed dpi Tips

Posted: Thu Jan 12, 2012 7:01 am
by oryaaaaa
150% Menu Font Problems. I want to fix by PB.