setting display resolution automatically

i had read from borland tips a way to detect what is your current resolution using GetDevCaps() function.
how about if your current resolution is just 256 colors. is there a way in c++ to automatically change the
display resolution to 16bpp automatically?

example my program will not run if i have 256 colors as my resolution, it should only run on 16bpp or
higher so my program needs to change the resolution to 16bpp automatically in order to run.

thanks in advance,

arvin


Comments

  • : i had read from borland tips a way to detect what is your current resolution using GetDevCaps() function.
    : how about if your current resolution is just 256 colors. is there a way in c++ to automatically change the
    : display resolution to 16bpp automatically?
    :
    : example my program will not run if i have 256 colors as my resolution, it should only run on 16bpp or
    : higher so my program needs to change the resolution to 16bpp automatically in order to run.
    :
    : thanks in advance,
    :
    : arvin
    :

    What you are actually refering to is "Color Depth"... Try looking up something in the C++ library on color depth. It should be a member of the graphics header family.

    As fas as automatic detection goes... Find a function (or the components to build one) that will detect the current color depth. Compair it to see if it's return value is less then 16 Bit... If this comes to true.. initiate a depth change...

    EXAMPLE:

    if (FindColorDepth() < 16BIT)
    NewColorDepth(16BIT)

    this won't work... but find the correct funcions to replace these and you should be in busniess. <<<WICKET>>>



    URL:http://www.wicketware.com

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories