Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen refresh rate.

Status
Not open for further replies.

imagenetics

Programmer
Dec 8, 2003
66
PL
1. How to retrieve current screen refresh rate value (the one in MHz in advanced display properties dialog) and store it within a variable?

2. How to change it?
 
Never tried this, but see if this works:

DEVMODE dmMode;

memset(&dmMode, 0, sizeof(dmMode));
dmMode.dmSize = sizeof(dmMode);
dmMode.dmFields = DM_DISPLAYFREQENCY;
dmMode.dmDisplayFrequency = 70; // Assuming 70 Hz.

ChangeDisplaySettings(&dmMode, CDS_UPDATEREGISTRY);

If CDS_UPDATEREGISTRY is specified and it is possible to change the graphics mode dynamically, the information is stored in the registry and DISP_CHANGE_SUCCESSFUL is returned. If it is not possible to change the graphics mode dynamically, the information is stored in the registry and DISP_CHANGE_RESTART is returned.

Good luck,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top