diff --git a/include/wx/msw/statbox.h b/include/wx/msw/statbox.h index 0922fe12ee..e3714e0a36 100644 --- a/include/wx/msw/statbox.h +++ b/include/wx/msw/statbox.h @@ -45,6 +45,9 @@ public: protected: virtual wxSize DoGetBestSize() const; + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const; + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index deb7761c26..6ecb72dff2 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -121,11 +121,18 @@ bool wxStaticBox::Create(wxWindow *parent, if ( !MSWCreateControl(wxT("BUTTON"), label, pos, size) ) return false; +#ifndef __WXWINCE__ Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBox::OnPaint)); +#endif return true; } +wxBorder wxStaticBox::GetDefaultBorder() const +{ + return wxBORDER_NONE; +} + WXDWORD wxStaticBox::MSWGetStyle(long style, WXDWORD *exstyle) const { long styleWin = wxStaticBoxBase::MSWGetStyle(style, exstyle);