[comp.windows.ms.programmer] Modal dialog boxes and MessageBox

tom@mims-iris.waterloo.edu (Tom Haapanen) (12/10/90)

I use MessageBox() to pop up error messages and confirm actions, which
is what I think it's meant for.  However, if I call MessageBox() from
inside a modal dialog box procedure, Windows doesn't provide modality
to the MessageBox() dialog, but instead makes it active along with the
original dialog box, letting the user totally ignore the existence of
the MessageBox() dialog.

How can I temporarily suspend the modality of my dialog for the duration
of the MessageBox()?  Do I really need to exit my dialog procedure in
order to have a modal MessageBox() dialog?

On an unrelated topic, I'd like to start up a repository of useful Windows
procedures and code fragments --- anyone else have interest in this?

[ \tom haapanen --- university of waterloo --- tom@mims-iris.waterloo.edu ]
[ "i don't even know what street canada is on"               -- al capone ]