| 47 | } |
| 48 | |
| 49 | bool 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 | |
| 62 | bool GetClientRectInfo(HWND hwnd, Rect &rect) { |
| 63 | RECT rc = {}; |
no test coverage detected