custom refresh rates for windows - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

custom refresh rates for windows

c.dolarc.dolar Posts: 2Member
Hi!
I'm trying to find out, how to force windows to change to a custom refresh rate (eg 77 Hz vertical) within a c++ programm for Windows.

I've seen a programm called "PowerStrip" (http://www.entechtaiwan.com/ps.htm) doing user defined resolutions with all kinds of refresh rates and timing options.
Is there a chance to do something similar within a c++ Programm?

Thanks,
Carsten

Comments

  • kissmyasmkissmyasm Posts: 38Member
    the following code will let you change the rate. the rate must be specified in Hz, not kHz, which you may be used to seeing. you must have the windows header file included... um... i think that is it


    DEVMODE dm;
    dm.dmDisplayFrequency = 77000;

    ChangeDisplaySettings(&dm, DM_DISPLAYFREQUENCY);


  • c.dolarc.dolar Posts: 2Member
    : the following code will let you change the rate. the rate must be specified in Hz, not kHz, which you may be used to seeing. you must have the windows header file included... um... i think that is it
    :
    :
    : DEVMODE dm;
    : dm.dmDisplayFrequency = 77000;
    :
    : ChangeDisplaySettings(&dm, DM_DISPLAYFREQUENCY);
    :
    :
    :
    Thanks for your answer. I tried it, but it didn't work because of Windows XP. I found out, that XP doesn't allow the change to a refresh rate that is different from the default values.
    I now use a programm called "Power Strip" from EnTech. It lets you change to custom rates, also in programs through a small API. That works pretty good.

    Carsten
Sign In or Register to comment.