🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #845

Modal dialog boxes and MessageBox()

#845
From: Tom Haapanen
Date: Mon, 10 Dec 1990 00:53
16 lines
1328 bytes
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 ]
Technical Details
Message-ID: <1990Dec10.005356.5707@watserv1.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!mims-iris.waterloo.edu!tom

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!mims-iris.waterloo.edu!tom
From: tom@mims-iris.waterloo.edu (Tom Haapanen)
Subject: Modal dialog boxes and MessageBox()
Message-ID: <1990Dec10.005356.5707@watserv1.waterloo.edu>
Sender: daemon@watserv1.waterloo.edu
Reply-To: tom@mims-iris.waterloo.edu (Tom Haapanen)
Organization: WATMIMS Research Group, University of Waterloo
Date: Mon, 10 Dec 90 00:53:56 GMT
Lines: 16