需要GDI+环境支持 Graphics graphics(pDC->m_hDC); FontFamily fontFamily(L"Times New Roman"); //字体设置 Font font(&fontFamily, 24, FontStyleRegular, UnitPixel); // 文本大小、显示方式设置 更详细的请参考MSDN PointF pointF(30.0f, 10.0f); // 输出起始点 SolidBrush solidBrush(Color(255, 0, 0, 255)); // 刷子 graphics.DrawString(L"Hello", -1, &font, pointF, &solidBrush);

评论