# Windows MessageBox() strangeness fixes

**URL:** <https://discourse.libsdl.org/t/windows-messagebox-strangeness-fixes/13138>\
**Category:** SDL Development\
**Created:** [March 14, 2006, 3:30am UTC](https://discourse.libsdl.org/t/windows-messagebox-strangeness-fixes/13138 "2006-03-14T03:30:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Mulholland](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/74df32/32.png) [@Peter\_Mulholland](https://discourse.libsdl.org/u/Peter_Mulholland)\
**Post date:** [March 14, 2006, 3:30am UTC](https://discourse.libsdl.org/t/windows-messagebox-strangeness-fixes/13138/1 "2006-03-14T03:30:11Z")

</div>

Hello all,

I _think_ this should fix the issues that people were seeing with  
MessageBox() not working and therefore assert() on mingw/msvc. Forgive  
me if i’ve screwed up making the diff file - I’m a total newb when it  
comes to things like CVS and diff.

It modifies a few files as I saw that FlushMessageQueue() was in both  
the windx5 and windib driver, so I moved this into wincommon. It was  
also in the gapi driver, so I changed that too. The function is now  
WIN\_FlushMessageQueue() in src/video/wincommon/SDL\_syswm.c–  
Best regards,  
Peter mailto:@Peter_Mulholland  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: msgloopfix.diff  
Type: application/octet-stream  
Size: 12460 bytes  
Desc: not available  
URL: [http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060314/186b9756/attachment.obj](http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060314/186b9756/attachment.obj)

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [March 14, 2006, 4:04am UTC](https://discourse.libsdl.org/t/windows-messagebox-strangeness-fixes/13138/2 "2006-03-14T04:04:29Z")

</div>

> I _think_ this should fix the issues that people were seeing with  
> MessageBox() not working and therefore assert() on mingw/msvc. Forgive  
> me if i’ve screwed up making the diff file - I’m a total newb when it  
> comes to things like CVS and diff.

Okay, this is in CVS, with a few tweaks.

I tested msgbox.c with this patch, built with Cygwin32, and got  
two assert messages.

Thanks!  
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment
