*********************
function issmallfonts(lDisplay)
*********************
// Pixels per inch if small or large font is active
#define SMALLFONT 96
#define LARGEFONT 120
// DeviceCap ID to retrieve device pix/inch attribute
#define LOGPIXELSX 88
#define LOGPIXELSY 90
LOCAL oDesktop := AppDesktop()
LOCAL hWND
LOCAL hDC
LOCAL nLogPix,cMsg
default lDisplay:=.f.
IF(ValType(oDesktop)!="O" .AND. !oDesktop:IsDerivedFrom("XbpIWindow"))
// Non GUI mode
RETURN(NIL)
ENDIF
hWND := oDesktop:GetHWND()
hDC := GetDC(hWND)
IF(hDC==-1)
// could not aquire device
RETURN(NIL)
ENDIF
nLogPix := GetDeviceCaps(hDC,LOGPIXELSX)
ReleaseDC(hWND,hDC)
IF lDisplay
cMsg:="Font Size is "+dc_xtoc(nLogPix)+" DPI"
cMsg+=". 96 DPI is the only DPI setting compatible with CUS Software"
dc_msgbox(cMsg)
ENDIF
RETURN(nLogPix== SMALLFONT)
DLLFUNCTION GetDC( nHWND ) USING STDCALL FROM USER32.DLL
DLLFUNCTION ReleaseDC( nHWND, nHDC ) USING STDCALL FROM USER32.DLL
DLLFUNCTION GetDeviceCaps( nHWND, nIndex ) USING STDCALL FROM GDI32.DLL
issmallfonts function from conference
issmallfonts function from conference
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises