zoukankan      html  css  js  c++  java
  • MFC 类库

    1.CWnd

    1.1.UpdateData()

    作用:

    UpdateData() and Updatedata(TRUE) are the same.

    UpdateData(TRUE) is used to copy the contents of the controls into the associated variables.

    UpdateData(FALSE) is used to put the values in the variables to the associated controls.

    1.2CString

    1.2.1Format 与printf()类似

    void Format( LPCTSTR lpszFormat, ... );  void Format( UINT nFormatID, ... );

    例:

    CString str = "Some Data";
    str.Format("%s%d", str, 123);  //%s 字符串,%d有符号十进制,%u无符号十进制,%o八进制

    1.3 MFC集合类 : http://msdn.microsoft.com/en-us/library/fw2702d6(v=vs.60).aspx

       CArray:  template< class TYPE, class ARG_TYPE > class CArray : public CObject

    注意:其可以自动分配和删除内存

       (1)Add(i):返回添加后元素的index

    // example for CArray::Add   ---引用自msdn
    CArray<CPoint,CPoint> ptArray;
    
    CPoint pt(10,20);
    ptArray.Add(pt);             // Element 0
    ptArray.Add(CPoint(30,40));  // Element 1   

       (2)Get(i)给出给定索引值的数据

       (3)GetSize()获得元素的数量
       (4)IsEmpty()判断是否为空
       (5)Insert()在指定位置插入



     

     

      

  • 相关阅读:
    Ajax(三)
    Ajax(二)
    Django(四)
    Ajax(一)
    Django(三)
    Django(二)
    Django(一)
    Http协议
    Bootstrap
    python 绑定方法
  • 原文地址:https://www.cnblogs.com/qianzhilan/p/4099241.html
Copyright © 2011-2022 走看看