CONST LOGPIXELSX = 88
DECLARE FUNCTION GetDesktopWindow LIB "user32" ALIAS "GetDesktopWindow" () AS LONG
DECLARE FUNCTION GetDC LIB "user32" ALIAS "GetDC"(BYVAL hWnd AS LONG) AS LONG
DECLARE FUNCTION GetDeviceCaps LIB "gdi32" ALIAS "GetDeviceCaps" (BYVAL hdc AS LONG, BYVAL nIndex AS LONG) AS LONG
DECLARE FUNCTION ReleaseDC LIB "user32" ALIAS "ReleaseDC" (BYVAL hWnd AS LONG, BYVAL hdc AS LONG) AS LONG
DECLARE FUNCTION CheckForSmallFonts() AS LONG
A = CheckForSmallFonts
FontSize=17-FIX(A/12)
FUNCTION CheckForSmallFonts() AS LONG
DIM hWndDesk AS LONG
DIM hDCDesk AS LONG
DIM logPix AS LONG
hWndDesk = GetDesktopWindow()
hDCDesk = GetDC(hWndDesk)
logPix = GetDeviceCaps(hDCDesk, LOGPIXELSX)
CALL ReleaseDC(hWndDesk, hDCDesk)
CheckForSmallFonts = logPix
END FUNCTION
|