Graphics gdi(this->GetDC()->m_hDC); //构造一个GDI+对象
Pen red(Color(255,255,0,0),3); //构造一个画笔 画笔透明度是255
gdi.DrawLine(&red,10,10,50,10); //画线
FontFamily m_font(L"宋体");
Font font(&m_font,24); //构造字体
SolidBrush brush(Color(255,0,0,255)); //输出字符串要构造一个画刷
CRect rect;
this->GetClientRect(&rect); //得到客户区大小
PointF point(rect.right/2,rect.bottom/2);//坐标点
gdi.DrawString(L"中华",2,&font,point,&brush);//输出字符串