5,530
社区成员
发帖
与我相关
我的任务
分享
HDC hdc = ::GetDC(NULL);
EnumDisplayMonitors(hdc, NULL, CMultiScreenShotEx::MonitorEnumProc, (LPARAM)this);
::ReleaseDC(NULL, hdc);
BOOL CALLBACK CMultiScreenShotEx::MonitorEnumProc( HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData )
{
CMultiScreenShotEx *pThis = (CMultiScreenShotEx *)dwData;
if (!(lprcMonitor->left == 0 && lprcMonitor->top == 0))
{
pThis->m_vecSecondaryScreen.push_back(*lprcMonitor);
}
return TRUE;
}