CDuiString 用法详解

来源:互联网 发布:php做app 编辑:程序博客网 时间:2024/06/08 19:27
CDuiString 用法详解:


1 Append(LPCTSTR str) 在原字符串基础上追加一个字符串;
  CDuiString  dui_str;
  dui_str.Append(_T("我是中国人!"));
  dui_str.Append(_T("我爱中国!"));
    //我是中国人!我爱中国!
2 Assign(LPCSTR pstr ,int nLength ) 在pstr字符串的nLength位置后的东西全部剪切掉不要;
  config.Assign(config, config.GetLength()-1);
   //我是中国人!我爱中国
3 Format(LPCSTR pstrformat, ...); 按照pstrformat字符串的格式,导入其他类型变量 
  CDuiString folde_path;
  folde_path.Format(_T("%ls"), std_string);
4 GetLength()采集一个变量的宽度(大小);
  config.GetLength();
0 0