[fpc-pascal] Windows unit problems
Matthews
dematthews at uwaterloo.ca
Thu Jun 10 22:05:39 CEST 2004
Thank you.
That was exactly what I needed.
-Lukas
At 06:30 AM 09-06-04, you wrote:
>Hello,
>
>
> > I'm attempting to retrieve information about the current resolution
> > settings, but I'm not having much luck. I've downloaded the Borland Win32
> > API, but I'm still stuck with creating the device context, and so on. I
> > need some massive help with this... =(
>
>Because the Borland help file is really outdated... use either the online
>MS-Platform SDK help (or alternatively the search engine of your choice =)
>or download it from MS.
>
>Here's a small program which prints the screen characteristics you need to
>the console (no need to fiddle around with device contexts, no error
>handling):
>
>program PrintScreenCharacteristics;
>
>uses
> Windows;
>
>var
> mode : TDevMode;
>
>const
> // this constant does not seem to be defined in my FPC distro
> ENUM_CURRENT_SETTINGS = $FFFFFFFF;
>
>begin
> EnumDisplaySettings(nil, ENUM_CURRENT_SETTINGS, mode);
> writeln(mode.dmPelsWidth, 'x', mode.dmPelsHeight, 'x',
> mode.dmBitsPerPel, '@',mode.dmDisplayFrequency);
> readln;
>end.
>
>See the MS-docs for this function for further explanation.
>
>Compiles and runs with FPC 1.9.3 - 2004/04/09.
>
>Regards,
> Thomas
>
>
>_______________________________________________
>fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.699 / Virus Database: 456 - Release Date: 04-Jun-04
-------------- next part --------------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 04-Jun-04
More information about the fpc-pascal
mailing list