MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / GetWindowClientRect

Function GetWindowClientRect

IntelPresentMon/Core/source/win/WinAPI.cpp:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace p2c::win
8{
9 gfx::RectI GetWindowClientRect(HWND hWnd)
10 {
11 RECT cr;
12 if (!GetClientRect(hWnd, &cr))
13 {
14 pmlog_warn().hr();
15 return { 0,0,0,0 };
16 }
17 POINT tl{ 0, 0 };
18 if (!ClientToScreen(hWnd, &tl))
19 {
20 pmlog_warn().hr();
21 return { 0,0,0,0 };
22 }
23 return { tl.x, tl.y, tl.x + cr.right, tl.y + cr.bottom };
24 }
25
26 std::wstring GetWindowTitle(HWND hWnd)
27 {

Callers 2

OverlayMethod · 0.85
HandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected