From c87fc2859df7329be3cf9484d9e27bc59dc63ea9 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 11 Feb 2005 09:19:34 +0000 Subject: [PATCH] Don't use mnemonics for OK, Cancel and Close under Windows, to follow style guidelines git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/button.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/msw/button.cpp b/src/msw/button.cpp index ba86e1650b..0c07934f05 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -132,7 +132,18 @@ bool wxButton::Create(wxWindow *parent, { wxString label(lbl); if (label.empty() && wxIsStockID(id)) - label = wxGetStockLabel(id); + { + // On Windows, some buttons aren't supposed to have + // mnemonics, so strip them out. + + label = wxGetStockLabel(id +#if defined(__WXMSW__) || defined(__WXWINCE__) + , ( id != wxID_OK && + id != wxID_CANCEL && + id != wxID_CLOSE ) +#endif + ); + } if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return false; -- 2.50.0