AfxMessageBox with Auto-close

Introduction This article describes how to make the MFC function AfxMessageBox to dispay a message box that is automatically dismissed after a given time. For that purpose we can do the following: Override CWinApp::DoMessageBox virtual function for customzing the default AfxMessageBox. Set a CBT hook to catch the message box creation. In the CBT hook … Read more