In order to support more flexible and powerful message box, MS provides task dialog API (A task dialog is similar to, while much more flexible than, a basic message box), by which we can create customized dialog box by configuration. So in practice, before writing your own, please give it a try whether it's enough to fulfill your requirement.
Visit here on MSDN to take a look at what kind of dialog it can implement.