AfxMessageBox
AfxMessageBox is a utility function provided by the Microsoft Foundation Class (MFC) library that displays a simple, modal message box with minimal programming effort. It serves as a wrapper around the Windows MessageBox API, integrating with MFC's application context and resources.
The typical signature is int AfxMessageBox(LPCTSTR lpszText, UINT nType = MB_OK, UINT nIDHelp = 0). The function shows
Usage notes: AfxMessageBox is modal to the calling thread and uses the MFC application context to determine
- AfxMessageBox(_T("Operation completed successfully."));
- int res = AfxMessageBox(_T("Delete file?"), MB_YESNO | MB_ICONQUESTION);