Get the monitors highest possible refresh rate for a given resolution

Started by
1 comment, last by Mhondoz 19 years, 6 months ago
First of all, Hi everybody. Have been reading these forums for a long time, but this is my first post. :) I want my application to change the display settings, and I have been using EnumDisplaySettings and ChangeDisplaySettings with success. But when I use EnumDisplaySettings I get some video modes with refresh rates higher than I can manually set in the Windows display control panel. This makes me think that the results from the EnumDisplaySettings gives all the modes the video card is capable of, but does not take into account the maximum properties of the monitor, is that right? Example, using EnumDisplaySettings I can se that my card supports a mode with 1280x1024x32 @ 100Hz, but in the Display control panel the highest possible refresh rate for that setting is 85Hz...? And, yes, I have installed the proper drivers for the monitor. :) So the question is, is it safe to ChangeDisplaySettings to a refresh rate that is higher than I can do manually? And is it possible to get the monitors maximum refresh rate from my program?
Advertisement
Yes, it's safe to call ChangeDisplaySettings with a higher refresh rate than your monitor can handle because the method will fail then and return an error.

To get the highest setting supported you can make repeated calls to ChangeDisplaySettings, if the function fails, try a lower setting (BBP or Hz) and eventyally it will succeed when the mode is supported by both video card and monitor.

\Jimmy H
Thank you for the quick reply. :)

/Mhondoz

This topic is closed to new replies.

Advertisement