[MFC][基本函数]StringCchPrintf()使用相关
来源:互联网 发布:知乎怎么了 编辑:程序博客网 时间:2024/04/29 10:26
Parameters
pszDest
[out] Pointer to a buffer that receives the formatted, null-terminated string created from pszFormat and its arguments.
cchDest
[in] Size of the destination buffer, in characters.
This value must be sufficiently large to accommodate the final formatted string plus 1 to account for the terminating null character.
The maximum number of characters allowed is STRSAFE_MAX_CCH.
大出的那一位就是放结尾0的。字符串长度计算的时候不包括结尾0。事实上拷贝的时候不需要拷贝结尾0,但是缓冲区必须多设置一个字符,并且要置为0。
The following example shows a simple use of StringCchPrintf, using four arguments.Examples
TCHAR pszDest[30]; size_t cchDest = 30;LPCTSTR pszFormat = TEXT("%s %d + %d = %d.");TCHAR* pszTxt = TEXT("The answer is");HRESULT hr = StringCchPrintf(pszDest, cchDest, pszFormat, pszTxt, 1, 2, 3);// The resultant string at pszDest is "The answer is 1 + 2 = 3."
- [MFC][基本函数]StringCchPrintf()使用相关
- [MFC][函数使用]StringCchPrintf()(未解决)
- StringCchPrintf
- MFC基本绘图-DDB函数的使用
- MFC相关函数介绍
- MFC相关函数代码
- MFC 基本控件使用
- mfc窗体坐标相关函数
- MFC中GetPrivateProfileString相关函数
- MFC里面一些基本函数
- MFC函数之定时器相关函数
- MFC中使用FLASH相关
- MFC基本控件及使用
- MFC之listControl基本使用
- MFC Tree 控件的相关函数
- MFC对消息处理的相关函数
- MFC list control控件的相关函数
- 初学MFC——基本函数
- C#3.0核心技术-第19章线程-全新翻译注释-19.13(2)
- C#3.0核心技术-第19章线程-全新翻译注释-19.13(3)
- sphinx
- 试问自己
- C#3.0核心技术-第19章线程-全新翻译注释-19.14(1)
- [MFC][基本函数]StringCchPrintf()使用相关
- IIS 错误 500
- C#3.0核心技术-第19章线程-全新翻译注释-19.14(2)
- [MFC][函数使用]StringCchPrintf()(未解决)
- 简单的c# 登录程序
- Datatable中对某列求和
- CMMI等级划分
- CSDN,我刚进来的第一天.
- QT学习笔记【2】