Results 1 to 7 of 7

Thread: getting the current refresh rate

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    Sterling Heights, MI, USA
    Posts
    11

    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.

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Posts
    22
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    Sterling Heights, MI, USA
    Posts
    11
    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.

  4. #4
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I think it means optimal or defaut adaptar refresh rate. Try changing your refresh rate to a number and then running the code.
    Baaaaaaaaah

  5. #5
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330
    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

  6. #6
    Junior Member
    Join Date
    Jun 2001
    Posts
    22
    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...

  7. #7
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I just checked it now and I am also getting 0
    I am running win98 SE
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width