我用的是ClogFont的类   Set fnt = New CLogFont
   Set fnt.LogFont = Form1.Font
   hFont = SelectObject(Form1.hDC, fnt.Handle)
   Form1.Print "Test: "
   DrawText Form1.hDC, s_Caption, LenB(StrConv(s_Caption, vbFromUnicode)), mCaptionRect, &H10 Or &H4 Or &H1 Or &H1000 Or &H800, mDrawTextParams
用Print方法,可以指定文字的字体同Form1.
用DrawText API,输出的文字和Fomr1的Font并不相同,如何才能使用DrawText时, 指定其输出的字体,请给出详细实使。谢谢
  

解决方案 »

  1.   

    From MSDN
    The DrawText function uses the device context's selected font, text color, and background color to draw the text.DrawText函数所绘制的文本使用设备上下文所选定的字体、文本颜色及背景颜色。并且
    If the selected font is too large for the specified rectangle, the DrawText function does not attempt to substitute a smaller font如果对指定的矩形来说选定的字体太大了,DrawText函数不会企图用一个小一点的字体来代替。
      

  2.   

    在场景中输出横向或纵向压缩的中文字符:
    http://www.chinaaspx.com/archive/dotnet/21956.htmHow to Convert ASCII Text to an Image:
    http://www.catenary.com/howto/text2img.html