GDI+画图怎么去掉原来的背景?
Image m_pImageClock(m_strImageName);
HDC hDC = ::GetDC(m_hWnd);
int length = m_pImageClock.GetWidth();
int heigth = m_pImageClock.GetHeight();
Point points[] = { Point(0, 0), Point(length, 0), Point(0, heigth)};
Graphics graph(hDC);
graph.DrawImage(&m_pImageClock,points, 3);
帖上去的是透明的PNG图片。
在OnmouseMove中画图,可是每次都会画一遍,没有清除原来画过的图片,导致画同一张图的时候颜色越来越深,如果不是同一张图就会叠加在一起。
窗口最小化再还原后就好了。但是鼠标靠近的时候还是悲剧。
在控件自绘里调用Invalidate();想让其重绘,没效果。
怎么样才能在画图之前先清空原来的图片?