- InvalidateRect(GetHwndOf(GetParent()), &rect, TRUE);
-}
-
-// under Win32 we use the standard static control style for this
-#ifdef __WIN16__
-bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item)
-{
- LPDRAWITEMSTRUCT lpDIS = (LPDRAWITEMSTRUCT) item;
-
- wxCHECK_MSG( !m_isIcon, FALSE, _T("icons not supported in wxStaticBitmap") );
-
- wxBitmap* bitmap = (wxBitmap *)m_image;
- if ( !bitmap->Ok() )
- return FALSE;
-
- HDC hDC = lpDIS->hDC;
- HDC memDC = ::CreateCompatibleDC(hDC);
-
- HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
-
- if (!old)
- return FALSE;
-
- int x = lpDIS->rcItem.left;
- int y = lpDIS->rcItem.top;
- int width = lpDIS->rcItem.right - x;
- int height = lpDIS->rcItem.bottom - y;
-
- // Centre the bitmap in the control area
- int x1 = (int) (x + ((width - bitmap->GetWidth()) / 2));
- int y1 = (int) (y + ((height - bitmap->GetHeight()) / 2));
-
- ::BitBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), memDC, 0, 0, SRCCOPY);
-
- ::SelectObject(memDC, old);
-
- ::DeleteDC(memDC);
-
- return TRUE;
-}
-#endif // Win16
-
-// We need this or the control can never be moved e.g. in Dialog Editor.
-long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
- WXWPARAM wParam,
- WXLPARAM lParam)
-{
-#ifndef __WXWINCE__
- // Ensure that static items get messages. Some controls don't like this
- // message to be intercepted (e.g. RichEdit), hence the tests.
- if ( nMsg == WM_NCHITTEST )
- return (long)HTCLIENT;
-#endif
-
- return wxWindow::MSWWindowProc(nMsg, wParam, lParam);