第9章图形绘制.pptVIP

  • 33
  • 0
  • 约2.46万字
  • 约 93页
  • 2016-08-03 发布于广东
  • 举报
第9章图形绘制

* * * 1. 使用成员函数CFont::CreatPointFont() 2. 使用成员函数CFont::CreateFontIndirect() 3. 使用成员函数CFont::CreateFont() 创建字体的方法: CClientDC dc(this); CFont fntZdy, *pfntOld; VERIFY(fntZdy.CreatePointFont(200, Arial, dc)); pfntOld=dc.SelectObject(fntZdy); // 选入设备环境 dc.TextOut(100, 100, Hello! This is 20 Pt Arial Font.); dc.SelectObject(pfntOld); // 恢复原来字体 fntZdy.DeleteObject(); // 删除自定义字体 例: CFont font; LOGFONT LogFnt; memset(LogFnt, 0, sizeof(LOGFONT)); // 清零结构LogFont LogFnt.lfHeight = 22; // 字体高度为22像素 strcpy(LogFnt.lfFaceName, Courier); // 匹配字体为Courier V

文档评论(0)

1亿VIP精品文档

相关文档