X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80a4659776396941bbf7b08615dd60d35dbc47b5..5ae1a6697062752f2098a7a6edf0b91e1a42b10a:/src/msw/statbmp.cpp diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 469d3e68c4..34aec58c09 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -42,9 +42,13 @@ #include // --------------------------------------------------------------------------- -// macors +// macros // --------------------------------------------------------------------------- +wxBEGIN_EVENT_TABLE(wxStaticBitmap, wxStaticBitmapBase) + EVT_SIZE(wxStaticBitmap::WXHandleSize) +wxEND_EVENT_TABLE() + // =========================================================================== // implementation // =========================================================================== @@ -206,6 +210,15 @@ wxSize wxStaticBitmap::DoGetBestClientSize() const return size; } +void wxStaticBitmap::WXHandleSize(wxSizeEvent& event) +{ + // Invalidate everything when our size changes as the image position (it's + // drawn centred in the window client area) changes. + Refresh(); + + event.Skip(); +} + #ifndef __WXWINCE__ void wxStaticBitmap::DoPaintManually(wxPaintEvent& WXUNUSED(event))