Board index » cppbuilder » How to chang display from 256 colors to High Color or True Color

How to chang display from 256 colors to High Color or True Color

My application runs on a couple of NT 4 machines that are often in 246 color
mode. (It took me a while to figure out why it would sometimes display
correctly but not at other times. I would like my ap to detect this and
change the mode to high color or true color (if available) when it loads.
How do I do this.  Mostly my aps run on NT or W2K but I would like this to
work on 98 or 95.

Thanks

 

Re:How to chang display from 256 colors to High Color or True Color


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 )

Re:How to chang display from 256 colors to High Color or True Color


Thanks

Bob

Quote
"Feng Yuan" <fengy...@home.com> wrote in message

news:VyQG5.14446$f5.504127@news1.sttls1.wa.home.com...
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 )

Re:How to chang display from 256 colors to High Color or True Color


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
"Feng Yuan" <fengy...@home.com> wrote in message

news:VyQG5.14446$f5.504127@news1.sttls1.wa.home.com...
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 )

Re:How to chang display from 256 colors to High Color or True Color


Robert,

www.bcbfaq.com has a FAQ on detecting screen res.
Might be useful for you.

Dave B.

Re:How to chang display from 256 colors to High Color or True Color


Thanks!
Quote
"dbulmer" <fferkel> wrote in message news:39eed606_2@dnews...
> Robert,

> www.bcbfaq.com has a FAQ on detecting screen res.
> Might be useful for you.

> Dave B.

Re:How to chang display from 256 colors to High Color or True Color


Sorry - link should be www.bcbdev.com
Quote

Other Threads