wsprintf妙用
2016-03-23 14:51
489 查看
wsprintf与sprintf和swprintf是不同的,具体见
/article/4970102.html
通过wsprintf进行MBCS和UNICODE编码转换
char szA[];
WCHAR wszA[];
wsprintfA(szA, "%S", wszA); // "%s" 将wszA按LPWSTR来解析
wsprintW(wszA,L"%S", szA); // "%s" 将szA按LPSTR来解析
具体见下边格式化说明:
/article/4970102.html
通过wsprintf进行MBCS和UNICODE编码转换
char szA[];
WCHAR wszA[];
wsprintfA(szA, "%S", wszA); // "%s" 将wszA按LPWSTR来解析
wsprintW(wszA,L"%S", szA); // "%s" 将szA按LPSTR来解析
具体见下边格式化说明:
ls, lS | String. This value is always interpreted as type LPWSTR, even when the calling application does not define Unicode. This value is equivalent to ws. |
s | String. This value is interpreted as type LPWSTR when the calling application defines Unicode and as typeLPSTR otherwise. | |
S | String. This value is interpreted as type LPSTR when the calling application defines Unicode and as typeLPWSTR otherwise |
相关文章推荐
- HRBUST 2085 囧 分型法
- Java基础 transient关键字
- Servlet的特点及运行过程
- linux ubuntu下如何安装并且切换java版本(Unsupported major.minor version 52.0)
- 【jQuery源码】整体架构
- iOS开发小技巧
- 根据用户身份证获取信息(php)
- 初始javascript闭包
- 【bzoj3675】[Apio2014]序列分割 单调队列+斜率优化
- 使用DOM方法递归遍历节点树
- MPEG-4, moving picture expert group 避免软弱无力的表达
- ios关于数据库第三方框架FMDB进阶用法
- 一致性哈希算法与Java实现
- gitlab 的从分支提交过程 --梁泽
- maven增加Spring
- 注释嵌入式软件的十大技巧
- 详解Android中ViewPager的PagerTabStrip子控件的用法
- SQL存储过程展易飞BOM
- 常用正则表达式
- 嵌入式linux的系统搭建与配置