MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / OnWindowResized

Method OnWindowResized

SampleFramework11/v1.02/App.cpp:171–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171LRESULT App::OnWindowResized(void* context, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
172{
173 App* app = reinterpret_cast<App*>(context);
174
175 if(!app->deviceManager.FullScreen() && wParam != SIZE_MINIMIZED)
176 {
177 int width, height;
178 app->window.GetClientArea(width, height);
179
180 if(width != app->deviceManager.BackBufferWidth() || height != app->deviceManager.BackBufferHeight())
181 {
182 app->BeforeReset();
183
184 app->deviceManager.SetBackBufferWidth(width);
185 app->deviceManager.SetBackBufferHeight(height);
186 app->deviceManager.Reset();
187
188 app->AfterReset();
189 }
190 }
191
192 return 0;
193}
194
195void App::Exit()
196{

Callers

nothing calls this directly

Calls 9

FullScreenMethod · 0.80
GetClientAreaMethod · 0.80
BackBufferWidthMethod · 0.80
BackBufferHeightMethod · 0.80
SetBackBufferWidthMethod · 0.80
SetBackBufferHeightMethod · 0.80
BeforeResetMethod · 0.45
ResetMethod · 0.45
AfterResetMethod · 0.45

Tested by

no test coverage detected