ceditview编辑框内的显示数据的大小应该是64k吧?可是我的这段程序却没有反映,循环值如果改小一点,比如1000,则正常,如2000则只能显示300多行,删除掉一部分后,则剩下的又可正常显示,谁来看看是怎么回事儿?void CTestView::OnTest()
{
// TODO: Add your command handler code here CString str, str1;
str.Format( "%c%c%d %c %x%c%c%d %c %x%c%c%d %c %x%c%c", 9, 9, 100, 58, 100, 9, 9, 100, 58, 100, 9, 9, 100, 58, 100, 13, 10 ); long i;
for( i=0 ; i<2048 ; i++ )
{
str1+=str;
if( str1.GetLength() > 65536 )
{
MessageBox("> 65536","错误!",MB_ICONSTOP);
str1="1";
break;
}
}
GetEditCtrl().SetWindowText( str1 );
}
{
// TODO: Add your command handler code here CString str, str1;
str.Format( "%c%c%d %c %x%c%c%d %c %x%c%c%d %c %x%c%c", 9, 9, 100, 58, 100, 9, 9, 100, 58, 100, 9, 9, 100, 58, 100, 13, 10 ); long i;
for( i=0 ; i<2048 ; i++ )
{
str1+=str;
if( str1.GetLength() > 65536 )
{
MessageBox("> 65536","错误!",MB_ICONSTOP);
str1="1";
break;
}
}
GetEditCtrl().SetWindowText( str1 );
}
只要把setLimitText设大点值应该就可以了吧。