I'd like to create a dialog for my application that shows a message and displays the standard red circle with the white "x" in the middle; seems to me this is a pretty standard windows dialog. I'm somewhat new to MFC, so I don't know if there's a short-cut to do this other than creating a dialog resource, copying the image of the red x from microsoft's best practices page, including that as a dialog item and then coding up my own. Surely there is a more standard way to do this?
AfxMessageBox(_T("Something bad happened!"), MB_OK | MB_ICONSTOP);
See also AfxMessageBox.
If the user can take corrective action about the error and you are targeting Windows Vista or higher, you can use CTaskDialog. This lets you present the new "Task Dialog" with large action buttons. Here's a tutorial, and the MSDN page.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With