| 197 | } |
| 198 | |
| 199 | void Window::SetClientArea(INT clientX, INT clientY) |
| 200 | { |
| 201 | RECT windowRect; |
| 202 | ::SetRect( &windowRect, 0, 0, clientX, clientY ); |
| 203 | |
| 204 | BOOL isMenu = (::GetMenu(hwnd) != nullptr); |
| 205 | if(!::AdjustWindowRectEx(&windowRect, style, isMenu, exStyle)) |
| 206 | throw Win32Exception(::GetLastError()); |
| 207 | |
| 208 | if(!::SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, SWP_NOMOVE)) |
| 209 | throw Win32Exception(::GetLastError()); |
| 210 | } |
| 211 | |
| 212 | void Window::GetClientArea(INT& clientX, INT& clientY) const |
| 213 | { |
no test coverage detected