style guidelines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31917
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxString label(lbl);
if (label.empty() && wxIsStockID(id))
{
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;
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return false;