]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbox.cpp
don't generate duplicate event for numpad keys with numlock on (patch 1448853)
[wxWidgets.git] / src / msw / statbox.cpp
index 51e6acfdef9bdb7fcf6efdef50a1b7c8e33057ad..bbd39a04dcd18fd723aeb842110b678b8bf2b51a 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "statbox.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -164,7 +160,7 @@ wxSize wxStaticBox::DoGetBestSize() const
     wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
 
     int wBox;
-    GetTextExtent(wxGetWindowText(m_hWnd), &wBox, &cy);
+    GetTextExtent(wxStripMenuCodes(wxGetWindowText(m_hWnd)), &wBox, &cy);
 
     wBox += 3*cx;
     int hBox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
@@ -390,7 +386,7 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& WXUNUSED(rc))
         const int x = 9;
 
         // TODO: RTL?
-        RECT rc = { x, 0, GetSize().x - x, y };
+        RECT rc = { x, 0, GetSize().x, y };
 
         const wxString label = GetLabel();
         ::DrawText(hdc, label, label.length(), &rc, DT_SINGLELINE | DT_VCENTER);