DwmSetDxFrameDuration function

Sets the number of monitor refreshes through which to display the presented frame.

DwmSetDxFrameDuration is no longer supported. Starting with Windows 8.1, calls to DwmSetDxFrameDuration always return E_NOTIMPL.


DWMAPI DwmSetDxFrameDuration(
  HWND hwnd,
  INT  cRefreshes



The handle to the window that displays the presented frame.


The number of refreshes through which to display the presented frame.

Return Value

This function always returns S_OK, even when the frame duration is not changed or DWM is not running.


The DWM will attempt to display the presented frame for at least the number of monitor refreshes specified. It might be impossible to display the frame for the precise number of refreshes due to the current composition rate. If the frame is presented late to the DWM or the DWM is late in composing, a frame could be displayed for fewer than the number of refreshes requested or even skipped completely.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dwmapi.h
Library Dwmapi.lib
DLL Dwmapi.dll