OnLButtonDown

void CMYButton::OnLButtonDown(UINT nFlags, CPoint point)
{

	CClientDC dc(this);
	CRect rect;
	GetClientRect(&rect);
	CBrush brush_black(RGB(0,0,0));
	dc.FillRect(&rect,&brush_black);
	brush_black.DeleteObject();
	for(int i = 2; i < 10; i += 2){
		rect.left += 4;
		rect.top += 4;
		rect.right -= 4;
		rect.bottom -= 4;
		dc.Draw3dRect(&rect,RGB(255,0,0),RGB(0,255,0));
	}

	dc.SetBkColor(RGB(255,255,255));
	dc.DrawText("button_down",11,rect,DT_CENTER|DT_VCENTER|DT_SINGLELINE);
	CButton::OnLButtonDown(nFlags, point);
}

你可能感兴趣的:(OnLButtonDown)