MCPcopy Create free account
hub / github.com/WallBreaker2/op / GetVisibleWindowRectInfo

Function GetVisibleWindowRectInfo

libop/window/WindowLayout.cpp:49–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49bool GetVisibleWindowRectInfo(HWND hwnd, Rect &rect) {
50 RECT rc = {};
51 if (::DwmGetWindowAttribute(hwnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rc, sizeof(rc)) != S_OK) {
52 return GetWindowRectInfo(hwnd, rect);
53 }
54
55 rect.x = rc.left;
56 rect.y = rc.top;
57 rect.width = rc.right - rc.left;
58 rect.height = rc.bottom - rc.top;
59 return true;
60}
61
62bool GetClientRectInfo(HWND hwnd, Rect &rect) {
63 RECT rc = {};

Callers 1

GetWindowMetricsFunction · 0.85

Calls 1

GetWindowRectInfoFunction · 0.85

Tested by

no test coverage detected