| 192 | } |
| 193 | |
| 194 | void Window::SetClientArea(INT clientX, INT clientY) |
| 195 | { |
| 196 | RECT windowRect; |
| 197 | ::SetRect( &windowRect, 0, 0, clientX, clientY ); |
| 198 | |
| 199 | BOOL bIsMenu = (::GetMenu(hwnd) != NULL); |
| 200 | if ( !::AdjustWindowRectEx(&windowRect, style, bIsMenu, exStyle)) |
| 201 | throw Win32Exception(::GetLastError()); |
| 202 | |
| 203 | if (!::SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, SWP_NOMOVE)) |
| 204 | throw Win32Exception(::GetLastError()); |
| 205 | } |
| 206 | |
| 207 | void Window::GetClientArea(INT& clientX, INT& clientY) const |
| 208 | { |