Don't use right-to-left markers in wxMSW wxMessageDialog code.

This mechanism is provided as an alternative to specifying MB_RTLREADING
style, e.g. if the source code can't be modified but the [string] resource
from which the message box message is loaded can be. We don't need to do this
if we do add MB_RTLREADING however.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-12-05 22:18:29 +00:00
parent f1fd45892f
commit c76ad77c01

View File

@@ -547,19 +547,6 @@ int wxMessageDialog::ShowMessageBox()
else
msStyle |= MB_TASKMODAL;
// per MSDN documentation for MessageBox() we can prefix the message with 2
// right-to-left mark characters to tell the function to use RTL layout
// (unfortunately this only works in Unicode builds)
wxString message = GetFullMessage();
#if wxUSE_UNICODE
if ( wxApp::MSWGetDefaultLayout(m_parent) == wxLayout_RightToLeft )
{
// NB: not all compilers support \u escapes
static const wchar_t wchRLM = 0x200f;
message.Prepend(wxString(wchRLM, 2));
}
#endif // wxUSE_UNICODE
#if wxUSE_MSGBOX_HOOK
// install the hook in any case as we don't know in advance if the message
// box is not going to be too big (requiring the replacement of the static
@@ -571,7 +558,13 @@ int wxMessageDialog::ShowMessageBox()
#endif // wxUSE_MSGBOX_HOOK
// do show the dialog
int msAns = MessageBox(hWnd, message.t_str(), m_caption.t_str(), msStyle);
const int msAns = MessageBox
(
hWnd,
GetFullMessage().t_str(),
m_caption.t_str(),
msStyle
);
return MSWTranslateReturnCode(msAns);
}