+ m_pImage = new wxBitmap((const wxBitmap &)rBitmap);
+
+ int nX;
+ int nY;
+ int nW;
+ int nH;
+
+ GetPosition(&nX, &nY);
+ GetSize(&nW, &nH);
+
+ ::WinSendMsg( GetHwnd()
+ ,SM_SETHANDLE
+ ,MPFROMHWND(m_pImage->GetHandle())
+ ,NULL
+ );
+ if (ImageIsOk())
+ {
+ int nWidth = rBitmap.GetWidth();
+ int nHeight = rBitmap.GetHeight();
+
+ if (nWidth && nHeight)
+ {
+ nW = nWidth;
+ nW = nHeight;
+
+ ::WinSetWindowPos( GetHwnd()
+ ,HWND_TOP
+ ,nX
+ ,nY
+ ,nWidth
+ ,nHeight
+ ,SWP_SIZE | SWP_MOVE | SWP_SHOW
+ );
+ }
+ }
+
+ RECTL vRect;
+
+ vRect.xLeft = nW;
+ vRect.yTop = nY;
+ vRect.xRight = nX + nW;
+ vRect.yBottom = nY + nH;
+
+ ::WinInvalidateRect(GetHwndOf(GetParent()), &vRect, TRUE);