/////////////////////////////////////////////////////////////////////////////
-// Name: msw/button.cpp
+// Name: src/msw/button.cpp
// Purpose: wxButton
// Author: Julian Smart
// Modified by:
#if wxUSE_BUTTON
+#include "wx/button.h"
+
#ifndef WX_PRECOMP
#include "wx/app.h"
- #include "wx/button.h"
#include "wx/brush.h"
#include "wx/panel.h"
#include "wx/bmpbuttn.h"
{
// On Windows, some buttons aren't supposed to have
// mnemonics, so strip them out.
-
- label = wxGetStockLabel(id
+
+ 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;
wxCoord wBtn,
hBtn;
- dc.GetMultiLineTextExtent(GetLabel(), &wBtn, &hBtn);
+ dc.GetMultiLineTextExtent(wxStripMenuCodes(GetLabel()), &wBtn, &hBtn);
// add a margin -- the button is wider than just its label
wBtn += 3*GetCharWidth();
#endif // __WIN32__
#endif // wxUSE_BUTTON
-