[fpc-pascal] Windows unit problems
tom_at_work at gmx.at
Wed Jun 9 12:30:05 CEST 2004
> 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
mode : TDevMode;
// this constant does not seem to be defined in my FPC distro
ENUM_CURRENT_SETTINGS = $FFFFFFFF;
EnumDisplaySettings(nil, ENUM_CURRENT_SETTINGS, mode);
writeln(mode.dmPelsWidth, 'x', mode.dmPelsHeight, 'x',
See the MS-docs for this function for further explanation.
Compiles and runs with FPC 1.9.3 - 2004/04/09.
More information about the fpc-pascal