Perform step by step debugging. This is where the endless message fishing cycle comes in. How to get to the code that sends messages here?
void CRenderDevice::message_loop() { if (editor()) { message_loop_editor(); return; } MSG msg; PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE); while (msg.message != WM_QUIT) { if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); continue; } on_idle(); } }