X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80a4659776396941bbf7b08615dd60d35dbc47b5..9ed99f82da680a40becbb4e72d03a30d4acb335e:/src/msw/statbmp.cpp diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 469d3e68c4..496df705a8 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -42,9 +41,13 @@ #include // --------------------------------------------------------------------------- -// macors +// macros // --------------------------------------------------------------------------- +wxBEGIN_EVENT_TABLE(wxStaticBitmap, wxStaticBitmapBase) + EVT_SIZE(wxStaticBitmap::WXHandleSize) +wxEND_EVENT_TABLE() + // =========================================================================== // implementation // =========================================================================== @@ -206,6 +209,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))