其中CMessageView继承CEditView
void CMyDoc::m_fnShowMessage(CString msg)
{
POSITION pos=GetFirstViewPosition();
while(pos!=NULL){
CMessageView* MessageView=(CMessageView*)GetNextView(pos);
if(!MessageView->IsKindOf(RUNTIME_CLASS(CMessageView)))
continue;
CEdit& edit=MessageView->GetEditCtrl();
int len=MessageView->GetWindowTextLength();
edit.SetSel(len,len);
edit.ReplaceSel(msg);
}
}
请问这是什么原因呢,是否CEdit有最大行数限制,如何解决呢?
多谢各位大侠指教。
7 个解决方案
#1
字符64K
#2
没有试过,不过我想如果内存管理得好的话是不应该只有64k的。
#3
最大限数是可以设置的
SetLimitText
SetLimitText
#4
同意 mashimaro3600(爱吃白菜||杀尽贪官)
#5
不管怎么设置,但总是有一个限度的,请见下文:
Specifies the maximum number of TCHARs the user can enter. For ANSI text, this is the number of bytes; for Unicode text, this is the numer of characters. This number does not include the null terminator.
Rich edit controls: If this parameter is zero, the text length is set to 64K characters.
Edit controls on Windows NT/ 2000: If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or –1 for multiline edit controls.
Edit controls on Windows 95/98: If this parameter is zero, the text length is set to 0x7FFE characters for single-line edit controls or 0xFFFF for multiline edit controls.
Specifies the maximum number of TCHARs the user can enter. For ANSI text, this is the number of bytes; for Unicode text, this is the numer of characters. This number does not include the null terminator.
Rich edit controls: If this parameter is zero, the text length is set to 64K characters.
Edit controls on Windows NT/ 2000: If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or –1 for multiline edit controls.
Edit controls on Windows 95/98: If this parameter is zero, the text length is set to 0x7FFE characters for single-line edit controls or 0xFFFF for multiline edit controls.
#6
字符数应该是有限制的
#7
对,默认字符数是30000。
可以加一个判断,当总行数%300==0时清除前一百五十行
可以加一个判断,当总行数%300==0时清除前一百五十行
#1
字符64K
#2
没有试过,不过我想如果内存管理得好的话是不应该只有64k的。
#3
最大限数是可以设置的
SetLimitText
SetLimitText
#4
同意 mashimaro3600(爱吃白菜||杀尽贪官)
#5
不管怎么设置,但总是有一个限度的,请见下文:
Specifies the maximum number of TCHARs the user can enter. For ANSI text, this is the number of bytes; for Unicode text, this is the numer of characters. This number does not include the null terminator.
Rich edit controls: If this parameter is zero, the text length is set to 64K characters.
Edit controls on Windows NT/ 2000: If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or –1 for multiline edit controls.
Edit controls on Windows 95/98: If this parameter is zero, the text length is set to 0x7FFE characters for single-line edit controls or 0xFFFF for multiline edit controls.
Specifies the maximum number of TCHARs the user can enter. For ANSI text, this is the number of bytes; for Unicode text, this is the numer of characters. This number does not include the null terminator.
Rich edit controls: If this parameter is zero, the text length is set to 64K characters.
Edit controls on Windows NT/ 2000: If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or –1 for multiline edit controls.
Edit controls on Windows 95/98: If this parameter is zero, the text length is set to 0x7FFE characters for single-line edit controls or 0xFFFF for multiline edit controls.
#6
字符数应该是有限制的
#7
对,默认字符数是30000。
可以加一个判断,当总行数%300==0时清除前一百五十行
可以加一个判断,当总行数%300==0时清除前一百五十行