Andy Koppe <andy.ko...@gmail.com> wrote: >> Cygwin setup.exe's message loop is this >> while (GetMessage (&msg, NULL, 0, 0) != 0 >> && GetMessage (&msg, (HWND) NULL, 0, 0) != -1) > > I might not sufficiently understand Win32 messaging, but to me that > looks as if it's dropping every other message. Shirley it should be > calling GetMessage only once?
That's what I thought too. But that's the current official source code, and setup.exe works fine with it like that. I did try replacing that loop by the standard loop used in Win32 tutorials, which as I mentioned in my original post, I'm using successfully in my test WinMain program: while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } The replacement caused no apparent change in the behaviour of setup.exe at all; it still works fine. More relevant to my problem, it still closes when I press alt+f4, unlike my test WinMain program. That proves that the message loop isn't the problem, so I still have my original question: Where's the correct place to intercept SC_CLOSE in setup.exe?