MCPcopy Create free account
hub / github.com/TheRealMJP/Shadows / SetClientArea

Method SetClientArea

Shadows/SampleFramework11/Window.cpp:194–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void 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
207void Window::GetClientArea(INT& clientX, INT& clientY) const
208{

Callers 1

RunMethod · 0.80

Calls 1

Win32ExceptionClass · 0.85

Tested by

no test coverage detected