# Refresh Rate Monitor

This topic is 3211 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi. I use DirectX 9. My problem is: how can I get the refreshrate of the both two monitor ? that are connected to the computer ? I use "GetAdapterDisplayMode": - for the primary monitor:
     D3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &D3DDisplayMode);


- for the secondary monitor ? what has to be the first input of the function "GetAdapterDisplayMode" ?

##### Share on other sites
If the monitors are on different adapters, then yes - just specify the adapter index instead of D3DADAPTER_DEFAULT. If both monitors appear as the same adapter, I don't think there's any way to do it - there doesn't seem to be any way to do it with GDI either.

Why do you need that information though? There's almost nothing you can do with it.

EDIT: The first parameter is the adapter index:
Quote:
I.e. 0, 1, 2, etc

##### Share on other sites
Quote:
 Original post by Evil SteveIf the monitors are on different adapters, then yes - just specify the adapter index instead of D3DADAPTER_DEFAULT. If both monitors appear as the same adapter, I don't think there's any way to do it - there doesn't seem to be any way to do it with GDI either.Why do you need that information though? There's almost nothing you can do with it.

Hi.

Thanks.

The refresh rate of the monitor is used to display a text, only for a determinate period of time.

##### Share on other sites
Quote:
 Original post by ClaudioThe refresh rate of the monitor is used to display a text, only for a determinate period of time.
Then use a timer, not the monitor refresh rate - what if the user has V-sync disabled in their display driver?

##### Share on other sites
Quote:
 Original post by Evil SteveIf both monitors appear as the same adapter, I don't think there's any way to do it - there doesn't seem to be any way to do it with GDI either.

EnumDisplayDevices and EnumDisplaySettings?
Quote:
 EnumDisplayDevicesTo query all display devices in the current session, call this function in a loop, starting with iDevNum set to 0, and incrementing iDevNum until the function fails. To select all display devices in the desktop, use only the display devices that have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag in the DISPLAY_DEVICE structure.

1. 1
2. 2
3. 3
JoeJ
12
4. 4
5. 5

• 12
• 16
• 13
• 20
• 12
• ### Forum Statistics

• Total Topics
632176
• Total Posts
3004588

×