I use the following structure to get new width and height of the resized SDL window. But with this structure I'm only able to get new data after the resizing is done that is when I finish dragging and release the mouse button. How can I get the new data continuously, that is while I'm dragging the window.
if (sdl_set->GetMainEvent()->type == SDL_WINDOWEVENT)
{
if (sdl_set->GetMainEvent()->window.event == SDL_WINDOWEVENT_RESIZED)
{
ScreenWidth = sdl_set->GetMainEvent()->window.data1;
ScreenHeight = sdl_set->GetMainEvent()->window.data2;
cout << "Window Resized!" << endl;
}
}
SDL_WINDOWEVENT_SIZE_CHANGED
– Ivan Aksamentov - DropSDL_SetWindowsMessageHook
which will call supplied function on every Windows message, beforeTranslateMessage
. – Xeverous