X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10b959e3729a77b95ab15614d1bdce74da327d8b..fed628b632d8ae95efded1f6a6894573c7a76bef:/src/msw/msgdlg.cpp?ds=inline diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index 5abe1042a5..77bf94c6b9 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -61,7 +61,11 @@ int wxMessageDialog::ShowModal(void) msStyle = MB_YESNOCANCEL; else msStyle = MB_YESNO; + + if (m_dialogStyle & wxNO_DEFAULT) + msStyle |= MB_DEFBUTTON2; } + if (m_dialogStyle & wxOK) { if (m_dialogStyle & wxCANCEL) @@ -82,8 +86,8 @@ int wxMessageDialog::ShowModal(void) msStyle |= MB_APPLMODAL; else msStyle |= MB_TASKMODAL; - - int msAns = MessageBox(hWnd, (LPCSTR)(const char *)m_message, (LPCSTR)(const char *)m_caption, msStyle); + + int msAns = MessageBox(hWnd, (LPCTSTR)(const wxChar *)m_message, (LPCTSTR)(const wxChar *)m_caption, msStyle); int ans = wxOK; switch (msAns) {