积极答复者
edit control 或者rich edit中如何实现回车换行

问题
答案
-
您好,
欢迎来到MSDN论坛。
根据我的经验,您的问题主要是需要对edit control 或 rich edit 的相关函数和属性进行了解。
1:回车换行:不指定ES_AUTOHSCROLL,在需要的时候会自动换行;
2:读取行总数(以回车符为每行分界):Edit_GetLineCount
3:读取任意行内容: Edit_GetLine
4:修改任意行内容:Edit_SetText
函数及属性参考文档请见以下链接:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775458(v=vs.85).aspx
希望对你有帮助!
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 May Wang - MSFT 2013年8月20日 2:45
全部回复
-
以下是我要达到的目的:
1:回车换行
2:读取行总数(以回车符为每行分界)
3:读取任意行内容
4:修改任意行内容
以上功能有些可以在论坛上找到有些没有比如回车换行功能,只有一行显示不下自动换行功能,自动换行是不是自动加进去了回车符号?自动换行会让数据格式混乱。
请教前辈如何解决以上问题,或者有什么参考书详细讲控件用法的,我找过不少参考书,都是草草带过,讲的不全面,包括论坛上也一样。
- 已合并 May Wang - MSFT 2013年8月19日 1:30 同一个人的问题,已有包含关系
-
编辑框控件设置Want Return属性
CEdit::GetLineCount()
CEdit::GetLine()
CEdit::GetWindowText/SetWindowText()/CEdit::ReplaceSel()
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已编辑 VisualElevenModerator 2013年8月20日 0:59 修改
-
您好,
欢迎来到MSDN论坛。
根据我的经验,您的问题主要是需要对edit control 或 rich edit 的相关函数和属性进行了解。
1:回车换行:不指定ES_AUTOHSCROLL,在需要的时候会自动换行;
2:读取行总数(以回车符为每行分界):Edit_GetLineCount
3:读取任意行内容: Edit_GetLine
4:修改任意行内容:Edit_SetText
函数及属性参考文档请见以下链接:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775458(v=vs.85).aspx
希望对你有帮助!
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 May Wang - MSFT 2013年8月20日 2:45