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.
