RE: [GD-Windows] (no subject)
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2003-03-30 15:54:46
|
> HDC hDC =3D GetDC( GetDesktopWindow() ); > int bitspixel =3D GetDeviceCaps( hDC, BITSPIXEL ); > ReleaseDC( GetDesktopWindow(), hDC ); Interesting. I would do it with EnumDisplaySettings passing=20 in something like ENUM_CURRENT_SETTINGS: struct foo { DEVMODE dm; char driversSuck[ 1024 ]; }; foo f; BOOL b =3D EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &f.dm ); Look at f.dm.dmPelsWidth, f.dm.dmPelsHeight and f.dm.dmBitsPerPel. The "driversSuck" field is empirically determined to be necessary=20 on some systems to avoid stack overwrites. Cheers, / h+ |