Win32 Peek/GetMessage parameters in DIB_PumpEvents

In DIB_PumpEvents, PeekMessage and GetMessage are called as follows:

while ( PeekMessage(&msg, NULL, 0, (WM_APP-1), PM_NOREMOVE) ) {
if ( GetMessage(&msg, NULL, 0, (WM_APP-1)) > 0 ) {

The parameter (WM_APP-1) causes some messages to be filtered. Similar things
happen in DX5_CheckInput and in another place in SDL_DibEvents.c.

I have been trying to use the ActiveX WebBrowser control inside an SDL
window. The message filtering described above causes the control to behave
rather erratic (eg. it will only start loading when you manually move the
window). When I remove the filtering:

while ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {

the control behaves fine.

Can someone explain why this filtering is done, or is it a bug?

Huib-Jan

Can someone explain why this filtering is done, or is it a bug?

It was left over from some really old Win32 sample code. :slight_smile:

Thanks! This is fixed in CVS. Oh, BTW, it might be nice to add a demo
of using ActiveX controls in SDL windows to the SDL demo page.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment