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

Function GetClientRectInfo

libop/window/WindowLayout.cpp:62–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62bool GetClientRectInfo(HWND hwnd, Rect &rect) {
63 RECT rc = {};
64 if (!::GetClientRect(hwnd, &rc)) {
65 return false;
66 }
67
68 POINT pt = {0, 0};
69 if (!::ClientToScreen(hwnd, &pt)) {
70 return false;
71 }
72
73 rect.x = pt.x;
74 rect.y = pt.y;
75 rect.width = rc.right - rc.left;
76 rect.height = rc.bottom - rc.top;
77 return true;
78}
79
80bool GetClientSize(HWND hwnd, int &width, int &height) {
81 RECT rc = {};

Callers 1

GetWindowMetricsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected