X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..834362a2e400478c9e9022f17c515493eaeb1174:/src/msw/statbmp.cpp diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 727d02e67f..c22387c146 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -189,7 +189,6 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) int w, h; GetPosition(&x, &y); GetSize(&w, &h); - RECT rect = { x, y, x + w, y + h }; #ifdef __WIN32__ HANDLE handle = m_isIcon ? (HANDLE)m_image.icon->GetHICON() @@ -204,10 +203,14 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) height = bitmap.GetHeight(); if ( width && height ) { + w = width; + h = height; + ::MoveWindow((HWND)GetHWND(), x, y, width, height, FALSE); } } + RECT rect = { x, y, x + w, y + h }; InvalidateRect((HWND)GetParent()->GetHWND(), &rect, TRUE); }