+
+ // 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 ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
+ {
+ // NB: not all compilers support \u escapes
+ static const wchar_t wchRLM = 0x200f;
+ message.Prepend(wxString(wchRLM, 2));
+ }
+#endif // wxUSE_UNICODE
+
+ // install the hook if we need to position the dialog in a non-default way
+ if ( wxStyle & wxCENTER )
+ {
+ const DWORD tid = ::GetCurrentThreadId();
+ m_hook = ::SetWindowsHookEx(WH_CALLWNDPROCRET,
+ &wxMessageDialog::HookFunction, NULL, tid);
+ HookMap()[tid] = this;
+ }