Steve Loughran wrote:
Does anyone know where I should be looking to determine if the user has
selected "large" or "very large" fonts in the control panel -> display
-> appearance settings?
Various ways, depending exactly what you want to achieve. Here's one
way (although I don't have an OS that supports the 'very large' setting
- XP only I think - so you'll have to see what value you get for that).
#!perl -w
use strict;
use warnings;
use Win32::GUI qw();
sub LOGPIXELSX() {88}
# Get the logical pixels per inch in the X direction for
# the default "DISPLAY" device
my $size = Win32::GUI::DC->new()->GetDeviceCaps(LOGPIXELSX);
if ($size == 96) { # 96 dpi is small system font
print "Small System Font\n";
}
elsif ($size == 120) { # 120 dpi is large system font
print "Large System Font\n";
}
else { # All other sizes (on Win98) are called 'Custom'
print "Custom font size: ", $size, "dpi\n";
}
__END__
Regards,
Rob.