| 78 | } |
| 79 | |
| 80 | bool GetClientSize(HWND hwnd, int &width, int &height) { |
| 81 | RECT rc = {}; |
| 82 | if (!::GetClientRect(hwnd, &rc)) { |
| 83 | return false; |
| 84 | } |
| 85 | |
| 86 | width = rc.right - rc.left; |
| 87 | height = rc.bottom - rc.top; |
| 88 | return true; |
| 89 | } |
| 90 | |
| 91 | void GetInsets(const Metrics &metrics, Insets &insets) { |
| 92 | insets.left = metrics.client_rect.x - metrics.window_rect.x; |
no outgoing calls
no test coverage detected