X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..10793ebfbb49d48e6a97f8e2d02081f458bd80b4:/src/msw/tglbtn.cpp diff --git a/src/msw/tglbtn.cpp b/src/msw/tglbtn.cpp index 55368ab31c..d9c7fd1245 100644 --- a/src/msw/tglbtn.cpp +++ b/src/msw/tglbtn.cpp @@ -114,7 +114,7 @@ wxSize wxToggleButton::DoGetBestSize() const { wxString label = wxGetWindowText(GetHWND()); int wBtn; - GetTextExtent(label, &wBtn, NULL); + GetTextExtent(wxStripMenuCodes(label), &wBtn, NULL); int wChar, hChar; wxGetCharSize(GetHWND(), &wChar, &hChar, GetFont());