From: Robin Dunn Date: Mon, 13 Sep 1999 02:50:35 +0000 (+0000) Subject: Made wxNO_DEFAULT set the "no" button as the default, according to the docs X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/93c95e18f416c25995bf84843694c30a488499c6 Made wxNO_DEFAULT set the "no" button as the default, according to the docs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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)