I am trying to change the size of the graphics device buffer when the window is resized, but I was unlucky in detecting the event.
This is C ++ Windows programming. I tried:
while(WM_QUIT != msg.message){ if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){ switch(msg.message){ case WM_SIZE: return; //<-- If the program closes because of this return, then I know I found the right statements. } //TranslateMessage(&msg); //DispatchMessage(&msg); }else{ poly.setConstantBuffer(space.getCamera()); poly.draw(iSize); graphics.render(); } }
He does not return, therefore this is not true. What is the correct way to capture a resize event?
source share