我想用OnDrawItem,就是在那个图片Draw了以后再画叉,可是还是没有!
void JumpingDialog::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
{
// TODO: Add your message handler code here and/or call default
CDialog::OnDrawItem(nIDCtl, lpDrawItemStruct);
if(nIDCtl==IDC_STATIC_IMG){//图片ID
int x=100;
int y=100;
CDC *pDC= GetDC();
CPen pen(PS_SOLID,5,0x00ff00);
CPen* op=pDC->SelectObject(&pen);
pDC->MoveTo(x,y-5);
pDC->LineTo(x,y+5);
pDC->MoveTo(x-5,y);
pDC->LineTo(x+5,y);
pDC->SelectObject(op);
pen.DeleteObject();
}
}