X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..18c98e42eeb75317f75c9ba20b09a5bd531a690c:/src/msw/msgdlg.cpp?ds=sidebyside diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index f90d620808..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,7 +86,7 @@ int wxMessageDialog::ShowModal(void) msStyle |= MB_APPLMODAL; else msStyle |= MB_TASKMODAL; - + int msAns = MessageBox(hWnd, (LPCTSTR)(const wxChar *)m_message, (LPCTSTR)(const wxChar *)m_caption, msStyle); int ans = wxOK; switch (msAns)