|
-
Jul 19th, 2001, 06:54 AM
#1
Thread Starter
New Member
getting the current refresh rate
Does anyone know of a function that can retrieve the refresh rate (in Hz) of the current display in Win9x? I looked long and hard, but came up empty handed. I tried using EnumDisplaySettings, and checking dmFrequency, but this doesn't seem to be what I am looking for. Thanks in advance.
-
Jul 19th, 2001, 11:06 AM
#2
Junior Member
i did this:
Code:
DEVMODE devmode;
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode);
cout << devmode.dmDisplayFrequency;
and it worked fine, returning 85 for the current Hz.
-
Jul 19th, 2001, 12:39 PM
#3
Thread Starter
New Member
That's odd. I tried it again and dmDisplayFrequency still gives me zero. Does that mean default or something? I have no idea, this is all still new to me. Thanks anyway.
-
Jul 20th, 2001, 01:10 AM
#4
PowerPoster
I think it means optimal or defaut adaptar refresh rate. Try changing your refresh rate to a number and then running the code.
-
Jul 21st, 2001, 07:04 PM
#5
Hyperactive Member
i tried that code as well and got 0. I called getlast error and recieved error 120 which means its not supported by my system yet im running Win 98.?? Do you know whats going on ? thanks
Matt 
-
Jul 22nd, 2001, 12:43 AM
#6
Junior Member
don't know why it doesn't work, it should work on Win95+ and WinNT3.51+ ... though I wrote it on WinXP, and also tested it on Win2000 ... I don't have a Win98 box I can run it on though...
-
Jul 22nd, 2001, 01:27 AM
#7
PowerPoster
I just checked it now and I am also getting 0
I am running win98 SE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|