zoukankan      html  css  js  c++  java
  • 孙鑫MFC学习笔记5:文本显示

    1.CreateSolidCaret添加一个插入符

                参数:宽度,高度

                            如果设为0,就设为默认窗口边界的宽度和高度

    2.GetSystemMetrics获取默认窗口边界的宽度和高度

    3.Caret在创建后默认是隐藏的,需要调用ShowCaret()显示

    4.GetTextMetrics获取当前字体信息

     

    5.TEXTMETRIC结构体

    6.宽度设为tmAveCharWidth/8

    7.CreateCaret可以创建图形插入符

    8.CString

                . CString可作为连接操作的结果而增大。 

                · CString对象遵循值语义。应将CString看作是一个真实的字符串而不是指向字符串的指针。 

                · 你可以使用CString对象任意替换const char*和LPCTSTR函数参数

    9.LoadString加载字符串资源

    10.BeginPath

     

    CDC::BeginPath

    BOOL BeginPath( );

     

    Return Value

     

    Nonzero if the function is successful; otherwise 0.

     

    Remarks

     

    Opens a path bracket in the device context. After a path bracket is open, an application can begin calling GDI drawing functions to define the points that lie in the path. An application can close an open path bracket by calling the EndPath member function. When an application calls BeginPath, any previous paths are discarded.

     

    11.EndPath

    CDC::EndPath

    BOOL EndPath( );

     

    Return Value

     

    Nonzero if the function is successful; otherwise 0.

     

    Remarks

     

    Closes a path bracket and selects the path defined by the bracket into the device context

     

    12.GetTextExtent获取文字信息,返回长度和宽度

    13.CSize

                与SDK中SIZE相同

     

    14.SelectClipPath设定剪切区域互操作模式

    15.SetCaretPos设置插入符位置

    16.GetBkColor获取背景色

    17.Left取字符串左侧n个字符

    18.GetLength获取CString中字符数量

    19.CreatePointFont新增字体

    20.DrawText在指定矩形里面显示文字,截断(模拟卡拉OK字幕)

    21.SetTimer设置定时器

     

     

    菊子曰 用菊子曰博客,就是爽!
  • 相关阅读:
    es6之Promise
    es6之Proxy,Reflect
    js之对象
    Set,Map与Array,Object对比
    es6之数据结构 set,WeakSet,mapWeakMap
    es6之Symbol
    flex布局
    盒子模型,top和margin-top
    POJ1274-The Perfect Stall
    Codeforces 671D. Roads in Yusland 题解
  • 原文地址:https://www.cnblogs.com/SkyFireITDIY/p/4371630.html
Copyright © 2011-2022 走看看