Published by alax on 02 Dec 2006 at 11:39 am
How to add features to standard message boxes in ATL and WTL
MessageBox function is easy to use but it sometimes lacks features. They can be added through a hook, however. This sample demonstrates three features for message boxes:
- AtlMessageBoxEx shows message box centered by parent window
- AtlTimedMessageBoxEx shows message box with countdown timer to close
- AtlOptionalMessageBoxEx shows message box with checkbox to suppress the box in future (the setting is stored into registry)
AtlTimedMessageBoxEx:

AtlOptionalMessageBoxEx:

Visual C++.NET 2003 source code can be downloaded here, compiled binary - here.
Leave a Reply
You must be logged in to post a comment.
