How Can I set the refresh rate for the Monitor ?

Started by
10 comments, last by cippyboy 21 years, 9 months ago
quote:
ChangeDisplaySettings() with the CDS_TEST flag...?

But what if the wrong monitor driver was installed... would the flag CDS_TEST work at all cases?
____________________________________MSN | AIM | YIM | ICQ
Advertisement
ok ok ok

this is some code I ripped from my generic setup window for most of the apps I use... it lists all avaliable resolutions..
it's using mfc class's, but is still applicable.
the avaliable video modes are listed in a combo box.. (m_ModeControl)

this is pretty rough code. but it works.


    	DEVMODE devmodes[512];	int n = 0;	while (EnumDisplaySettings(NULL, n, &devmodes[n]))	{		if (ChangeDisplaySettings(&devmodes[n], CDS_TEST) != DISP_CHANGE_SUCCESSFUL)		{			CString a;			a+=devmodes[n].dmPelsWidth;			a+=" x ";			a+=devmodes[n].dmPelsHeight;			a+=" - ";			a+=devmodes[n].dmBitsPerPel;			a+="bit ";			a+=devmodes[n].dmDisplayFrequency;			a+="Hz";			m_ModeControl.InsertString(n,a);		}		n++;	}    


[edited by - RipTorn on July 25, 2002 3:56:39 AM]

This topic is closed to new replies.

Advertisement