[MWF] Improvements to MessageBox width

These changes improve the size of the message box when the message box shows a lot of text. This fixes bugs #2090, #15504, and #16374.