MFC格式化输出
来源:互联网 发布:微信公众平台 java 编辑:程序博客网 时间:2024/05/15 20:48
temp.Format(L"0%s",temp);自己不能format自己,MSDN上有说明:
The call will fail if the string object itself is offered as a parameter to Format. For example, the following code will cause unpredictable results:
CAtlString str = "Some Data";
str.Format("%s%d", str, 123);
The call will fail if the string object itself is offered as a parameter to Format. For example, the following code will cause unpredictable results:
CAtlString str = "Some Data";
str.Format("%s%d", str, 123);
// Attention: str is also used in the parameter list.
格式化字符串用%05x呗,如果是总共5位,不足补0的话。
如果BILLCODE_LENGTH是固定值就好办,例如为8
int val = 123;
CString str;
str.Format("%08d",val);
//这时str="00000123";
str.Format("0x%08X",val);
//这时str="0x0000007B";
CString::Format先把数字位数填满0,%08d等,不足8为就补0
- MFC格式化输出
- MFC显示时间,日期,格式化输出
- MFC中时间类的使用以及格式化输出时间
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- 格式化输出
- wince隐藏任务栏与去除桌面图标 快捷方式
- 【Struct(结构体)杂谈之五】以空间换时间,Struct(结构体)中的成员对齐之道(下)
- 软件工程 个别思维导图总结
- 如何使用cocos2d的CCWaves波纹效果
- windows下安装apache+php+mysql+phpMyAdmin步骤及教训
- MFC格式化输出
- Dom4j的使用(全而好的文章)
- poj 1833 排列 [ 使用STL的next_permutation函数生成全排列 + STL中copy函数的用法完美解决 ]
- linux静态库和共享库
- Android APK签名 -- APK Crack
- MyEclipse10的反编译插件使用说明
- 《coredump问题原理探究》windows版第四章函数的逆向
- 【php】再谈php单双引号
- 使用Win32/MFC实现Splash窗口(含有alpha通道的位图窗口)