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

Method SetClientArea

SampleFramework12/v1.00/Window.cpp:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void 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
212void Window::GetClientArea(INT& clientX, INT& clientY) const
213{

Callers 1

Initialize_InternalMethod · 0.80

Calls 1

Win32ExceptionClass · 0.85

Tested by

no test coverage detected