When I doubleclick in Static Control, I will draw ellipse in Static Control in the position of mouse.(MFC);
But, It apears that:
我的代码是:
无效的 CTree showLabel:: OnLButtonDblClk (Unt nFlags, Cpoint 点)
{ { {
//______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
COLORREF 黑 = RGB(255,0,0,0);
CPen 笔(PS_SOLID, 1, 黑色);
CCLentDC Dc( GetDlgIot( IDC_ TREESTATIC) ) ; (GetDlgIot( IDC_ TREESTATIC) ) ;
Dc. 选择对象( pen) ;
//在鼠标处画图
CPoint curPos;
GetCursorPos(&curPos);
CPoint point1(0,0);
point1.x = curPos.x - 50;
point1.y = curPos.y - 50;
CPoint point2(0,0);
point2.x = curPos.x + 50;
point2.y = curPos.y + 50;
//画圆
Dc.Ellipse(CRect(point1, point2));
CStatic::OnLButtonDblClk(nFlags, point);
时 时
环环是可怕的。