In C++/MFC, what's the simplest way to show a message box with a "Don't show this again" option?
In my case, I just want a simple MB_OK message box (one OK button).
In C++/MFC, what's the simplest way to show a message box with a "Don't show this again" option?
In my case, I just want a simple MB_OK message box (one OK button).
Probably just subclass a CDialog with a label, button(s), and a check box in the window.
If the user checks the box, then save this information in a config file that's loaded each time the application's run. Then, before calling the DoModal() method, check to see whether the user opted out.
If your on Vista and up you can use the new TaskDialog
API.
Here is a sample usage with the "Don't show again" checkbox.
BCGSoft has a message box with this option: http://www.bcgsoft.com/featuretour/tour255.htm
Thanks for all the answers. I will add one more, although I ended up selecting @Stefan's answer for being the simplest way to do it.
Before I saw Stefan's answer, I was using XMessageBox. It had a lot of options that I didn't want, but it worked on all systems, it's worth checking. You can find XMessageBox on http://www.codeproject.com/KB/dialog/xmessagebox.aspx.