MFC 按字节读取字符串 添加换行符 实现static text自动换行
来源:互联网 发布:织梦v57漏洞 编辑:程序博客网 时间:2024/06/05 16:52
void FaultDialog::CutStringc(CString str)
{
int len; //多少字节换行
len = str.GetLength();
CString temp_str;
temp_str="";
int templen = 0;
for(int i = 0;i < len ;i++)
{
temp_str+=str[i];
int aaa = (int)str.GetAt(i);
if (aaa > 255)
{
templen+= 2;
}
else
{
templen+= 1;
}
if(templen > 30)
{
CString strLineFeed = _T("\r\n");
temp_str=temp_str+strLineFeed;
templen = 0;
}
}
test_str=temp_str;
}
{
int len; //多少字节换行
len = str.GetLength();
CString temp_str;
temp_str="";
int templen = 0;
for(int i = 0;i < len ;i++)
{
temp_str+=str[i];
int aaa = (int)str.GetAt(i);
if (aaa > 255)
{
templen+= 2;
}
else
{
templen+= 1;
}
if(templen > 30)
{
CString strLineFeed = _T("\r\n");
temp_str=temp_str+strLineFeed;
templen = 0;
}
}
test_str=temp_str;
}
- MFC 按字节读取字符串 添加换行符 实现static text自动换行
- C# 在字符串中添加“\r”换行符 实现lable自动换行
- Sublime Text自动换行
- 字符串固定字节换行
- MFC edit控件实现自动换行
- mfc edit 自动换行
- mfc richedit 自动换行
- android textview 添加text.放不下自动换行
- Symbian 字符串自动换行
- 字符串自动换行函数
- 字符串打印自动换行
- Sublime Text 2 自动换行
- Sublime text设置自动换行
- MFC Edit实现换行
- 不自动添加换行符的puts()
- TextView 实现自动换行
- uilabel实现自动换行
- EditText实现自动换行
- Windows VC获取准确时间的方法
- POJ P1321 棋盘问题
- UVa 12018 - Juice Extractor 切水果dp----------暂时存疑
- tcpdump使用小记
- POJ_1797(dijkstra实现)
- MFC 按字节读取字符串 添加换行符 实现static text自动换行
- linux signal使用注意点
- 状态栏透明
- 模块-kernel 模块编译(Makefile编写)
- sql case when 用法
- 预编译的 SQL 语句的对象-PreparedStatement
- java设置图片的大小(缩略图)
- 记录一些可能会用到的html标签
- dotConnect for Oracle中的OracleClient迁移