본문 바로가기

카테고리 없음

듀얼 모니터에서 Focused Monitor의 Rect 알아내기

    HMONITOR hMonitor;
    MONITORINFO mi;
    RECT        rc;

    // get the nearest monitor to the passed rect.
    hMonitor = MonitorFromRect(&wRect, MONITOR_DEFAULTTONEAREST);

    // get the work area or entire monitor rect.
    mi.cbSize = sizeof(mi);
    GetMonitorInfo(hMonitor, &mi);
    ...
    ...

출처: http://kurapa.com