mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
9 lines
244 B
C++
9 lines
244 B
C++
#include "pch.h"
|
|
#include "Utils.h"
|
|
|
|
RECT Utils::MonitorRectFromWindow(HWND hWnd) noexcept {
|
|
HMONITOR hMon = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
|
|
MONITORINFO mi{ sizeof(mi) };
|
|
GetMonitorInfo(hMon, &mi);
|
|
return mi.rcMonitor;
|
|
}
|