HRESULT DwmGetCompositionTimingInfo(
HWND hwnd,
DWM_TIMING_INFO *pTimingInfo
);
参数说明:
- hwnd: 要获取组合定时信息的窗口句柄。
- pTimingInfo: 一个指向 DWM_TIMING_INFO 结构的指针,用于接收组合定时信息。
DWM_TIMING_INFO 结构定义如下:
typedef struct _DWM_TIMING_INFO {
UINT32 cbSize;
DWM_FRAME_RATE rateRefresh;
QPC_TIME qpcRefreshPeriod;
DWM_FRAME_COUNT cRefresh;
UINT cDXRefresh;
QPC_TIME qpcCompose;
DWM_FRAME_COUNT cFrame;
UINT cDXPresent;
DWM_FRAME_COUNT cRefreshFrame;
DWM_FRAME_COUNT cFrameSubmitted;
UINT cDXPresentSubmitted;
DWM_FRAME_COUNT cFrameConfirmed;
UINT cDXPresentConfirmed;
DWM_FRAME_COUNT cRefreshConfirmed;
UINT cDXRefreshConfirmed;
DWM_FRAME_COUNT cFramesLate;
UINT cFramesOutstanding;
DWM_FRAME_COUNT cFrameDisplayed;
QPC_TIME qpcFrameDisplayed;
DWM_FRAME_COUNT cRefreshFrameDisplayed;
DWM_FRAME_COUNT cFrameComplete;
QPC_TIME qpcFrameComplete;
DWM_FRAME_COUNT cFramePending;
QPC_TIME qpcFramePending;
DWM_FRAME_COUNT cFramesDisplayed;
DWM_FRAME_RATE rateRefreshCurrent;
UINT cRefreshFrameCurrent;
DWM_FRAME_RATE rateComposeCurrent;
UINT cRefreshFrameLastQueued;
UINT cRefreshFrameLastDisplayed;
UINT cRefreshFrameLastConfirmed;
UINT cRefreshFrameLastPending;
UINT cRefreshRateLastQueued;
UINT cRefreshRateLastDisplayed;
UINT cRefreshRateLastConfirmed;
UINT cRefreshRateLastPending;
} DWM_TIMING_INFO;
这个结构包含了桌面窗口管理器的组合定时信息的各个方面。在调用 DwmGetCompositionTimingInfo 函数之前,需要先初始化 cbSize 字段为结构的大小。
请注意,为了使用这个函数,你的应用程序需要链接到 dwmapi.lib 并包含 dwmapi.h 头文件。
转载请注明出处:http://www.zyzy.cn/article/detail/27357/Win32 API/Dwmapi.h/DwmGetCompositionTimingInfo