EnumDisplayMonitors The EnumDisplayMonitors function enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers) that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a device context. EnumDisplayMonitors calls an application-defined MonitorEnumProc callback function once for each monitor that is enumerated. Note that GetSystemMetrics(SM_CMONITORS) counts only the display monitors.BOOL EnumDisplayMonitors( HDC hdc, // handle to display DC LPCRECT lprcClip, // clipping rectangle MONITORENUMPROC lpfnEnum, // callback function LPARAM dwData // data for callback function );
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &Mode);
Mode.dmPelsWidth = 显示器的宽度
Mode.dmPelsHeight = 显示器的高度
Mode.dmDisplayFrequency = 显示器的刷新频率
The EnumDisplayMonitors function enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers) that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a device context. EnumDisplayMonitors calls an application-defined MonitorEnumProc callback function once for each monitor that is enumerated. Note that GetSystemMetrics(SM_CMONITORS) counts only the display monitors.BOOL EnumDisplayMonitors(
HDC hdc, // handle to display DC
LPCRECT lprcClip, // clipping rectangle
MONITORENUMPROC lpfnEnum, // callback function
LPARAM dwData // data for callback function
);