I tried EnumDisplaySettings. The help says:
When you call EnumDisplaySettings with iModeNum set to zero, the operating
system initializes and caches information about the display device. When you
call EnumDisplaySettings with iModeNum set to a non-zero value, the function
returns the information that was cached the last time the function was
called with iModeNum set to zero. I guess what that means is that it
enumerate all the graphics modes of which it is capable.
I ran a test loop incrementing iModNum until EnumDisplaySettings returned
false. iModeNum was 98 at that point. I have a laptop with 8Mb of memory.
The display is 1024x768 and supports 32 bit color.
What's happening in my ap is that it runs on some machines that are set to
8bit color by another program. My program does not display correctly in
this mode so I want to save the current mode, in this case, and increase the
display to high color. At the very least I want to alert the user so the
display can be changed. When the program is quit I want to restore the
display if it has been changed. I know that I need a reference book so
thanks for the tip.
Bob
Quote:> Use EnumDisplaySettings to enumerate supported settings. Some display card
> does not support 24-bpp display mode, but supports 32-bpp display modes.
> Use ChangeDisplaySettings to change.
> Feng Yuan ( for the GDI to read, check www.fengyuan.com )