zoukankan      html  css  js  c++  java
  • gdi创建字体例子

        LOGFONT lf;
        lf.lfHeight         = 50 ; 
        lf.lfWidth          = 0 ; 
        lf.lfEscapement     = 0 ; 
        lf.lfOrientation    = 0 ; 
        lf.lfWeight         = 700 ; 
        lf.lfItalic         = 1 ; 
        lf.lfUnderline      = 1 ; 
        lf.lfStrikeOut      = 1 ; 
        lf.lfCharSet        = DEFAULT_CHARSET ; 
        lf.lfOutPrecision   = 0 ; 
        lf.lfClipPrecision  = 0 ; 
        lf.lfQuality        = 0 ; 
        lf.lfPitchAndFamily = 0 ; 
        TCHAR *fn = TEXT("黑体");
        lstrcpy (lf.lfFaceName, fn) ; 
        HFONT font = CreateFontIndirect(&lf);
        SelectObject(hdc,font);
    
        TextOut(hdc,0,0,"微软雅黑hd                     fhhgfhfg",35);

        LOGFONT lf;
        lf.lfHeight         = 50 ; 
        lf.lfWidth          = 0 ; 
        lf.lfEscapement     = 0 ; 
        lf.lfOrientation    = 0 ; 
        lf.lfWeight         = 700 ; 
        lf.lfItalic         = 1 ; 
        lf.lfUnderline      = 1 ; 
        lf.lfStrikeOut      = 1 ; 
        lf.lfCharSet        = DEFAULT_CHARSET ; 
        lf.lfOutPrecision   = 0 ; 
        lf.lfClipPrecision  = 0 ; 
        lf.lfQuality        = 0 ; 
        lf.lfPitchAndFamily = 0 ; 
        TCHAR *fn = TEXT("黑体");
        lstrcpy (lf.lfFaceName, fn) ; 
        HFONT font = CreateFontIndirect(&lf);
        SelectObject(hdc,font);
    
        BeginPath(hdc);
        TextOut(hdc,0,0,"微软雅黑hd                     fhhgfhfg",35);
        EndPath(hdc);
        StrokePath(hdc);

  • 相关阅读:
    深入浅出TCP之listen
    indexing and hashing
    c++四种强制类型转化
    c++实现web服务框架
    MVC、MVP、MVVM概念解析
    常用设计模式
    [React]虚拟DOM
    防抖和节流
    函数柯里化
    apply, bind, call方法剖析
  • 原文地址:https://www.cnblogs.com/wangjixianyun/p/2845061.html
Copyright © 2011-2022 走看看