   Gameloop vs moving the window (WinApi)
  Hello,I'm making a window with a gameloop, but when I move the window, the gameloop stays still. I know that I could use different threads, but wondering, if there's another way to do it.Thanks// Gameloop in WinMain:    BOOL bQuit = FALSE;    while (!bQuit)    {   /* check for messages */   if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))   {  /* handle or dispatch messages */  if (msg.message == WM_QUIT)  { bQuit = TRUE; break;  }  TranslateMessage (&msg);  DispatchMessage (&msg);   }   // drawing   Sleep(5);    }
  Do you have the Windows option "Show Window Contents While Dragging" turned on? That is, when you move the window, do you see the actual stuff in the window while you drag it around, or just an outline box?   ;  Windows suspends your message queue while certain UI tasks are done: choosing things from menubars, and moving/resizing a window if you don't have full display while dragging turned on. There isn't really anything you can do about that, although if your game engine is in a seperate thread processing will continue even though rendering won't.   