I also found this code, and an other variation (as I've sayd - I'm allready 
using GetDeviceCaps) but it unfortunatelly says 96 on both my "normal font" 
developement machine and on my "Extra Large Fonts" test machine :-(

ShowMe Software wrote:
> Cosmin,
> I picked this up on the web some time back.  It worked on an XP
> system set to large fonts.  I'm not using it now, but as I recall it
> worked for me.
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> function hasLargeFonts : Boolean;
>  { --------------------------------------------------------
>    Returns a boolean indicating whether or not the user has
>    Large Fonts enabled in Display Properties.
>    -------------------------------------------------------- }
>  var
>     liPPI   : longInt;  // holds pixels per inch for canvas
>     hCanvas : HDC;      // device context for current canvas
>
>  const
>     LGFPPI = 120;       // PPI when LgFonts active
>  begin
>
>     hCanvas := getDC( 0 );         // get current canvas
>     try
>        liPPI := getDeviceCaps( hCanvas, LOGPIXELSX );
>     finally
>        releaseDC( 0, hCanvas );    // prevent leaks
>     end;
>     result := ( liPPI = LGFPPI );  // compare and return
>
>  end; // hasLargeFonts
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> ----- Original Message -----
> From: "Cosmin Prund" <[EMAIL PROTECTED]>
> To: "Moderated discussion list about programming with Borland's
> Delphi" <[email protected]>
> Sent: Thursday, September 01, 2005 10:55 AM
> Subject: Detecting Large Fonts
>
>
>> I'm looking for a way to detecting rather I'm running on a LargeFonts
>> system
>> OR on a normal font system. I googled for "detect large font" and
>> found two
>> code samples both trying to detect large fonts using:
>>
>> DPI := GetDeviceCaps(DC, LOGPIXELSX);
>>
>> Unfortunatelly this code returns 96 on my WinXP Large Fonts test
>> system.
>>
>> Any idea how to detect this?
>> Thanks!
>>
>> _______________________________________________
>> Delphi mailing list -> [email protected]
>> http://www.elists.org/mailman/listinfo/delphi
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to