再不帮我我就死定了
我在一个消息响应函数中做以下代码:
SetForegroundWindow();
CPoint point;
GetCursorPos(&point);
m_point.x=point.x;
m_point.y=point.y;
CDC* pDC;
pDC=new CDC;
pDC->m_hDC=::GetDC(NULL);
CRect rect;
for(int i=0;i<4;i++)
{
rect.left=point.x-30*(i+1);
rect.right=point.x;
rect.top=point.y-20*(i+1);
rect.bottom=point.y;
point.x=rect.left;
point.y=rect.top;
pDC->Ellipse(rect);
if(i==3)
{
pDC->MoveTo(rect.left,(rect.bottom+rect.top)/2);
pDC->SetTextColor(RGB(255,0,0));
pDC->TextOut(rect.left+2,(rect.bottom+rect.top)/2-2,"Boss Welcome!!!");
}
}
m_rect.CopyRect(rect);
ReleaseDC(pDC);
现在我想在理一个消息响应中消除这些图,我该怎么办????
我的pDC所在的窗口句柄为空,所以她画出来的图是在当前屏幕,这些图不属于任何窗口,我用了很多方法都不能将该图删掉,各位大虾快帮帮我