X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12e424d28f9f82575c1ebb3fe57cd654a3a8d513..35bb3cb155917b4287fb2a3841bea22919a3d499:/src/msw/msgdlg.cpp diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index 5312a8ec06..061b9211a2 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -16,6 +16,8 @@ #pragma hdrstop #endif +#if wxUSE_MSGDLG + #include "wx/msgdlg.h" #ifndef WX_PRECOMP @@ -33,18 +35,6 @@ IMPLEMENT_CLASS(wxMessageDialog, wxDialog) -wxMessageDialog::wxMessageDialog(wxWindow *parent, - const wxString& message, - const wxString& caption, - long style, - const wxPoint& WXUNUSED(pos)) -{ - m_caption = caption; - m_message = message; - m_parent = parent; - SetMessageDialogStyle(style); -} - int wxMessageDialog::ShowModal() { if ( !wxTheApp->GetTopWindow() ) @@ -110,7 +100,7 @@ int wxMessageDialog::ShowModal() // 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 = m_message; + wxString message = GetFullMessage(); #if wxUSE_UNICODE if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ) { @@ -121,7 +111,7 @@ int wxMessageDialog::ShowModal() #endif // wxUSE_UNICODE // do show the dialog - int msAns = MessageBox(hWnd, message, m_caption, msStyle); + int msAns = MessageBox(hWnd, message.wx_str(), m_caption.wx_str(), msStyle); int ans; switch (msAns) { @@ -144,3 +134,5 @@ int wxMessageDialog::ShowModal() } return ans; } + +#endif // wxUSE_MSGDLG