我做了一个基于CEditView的编辑器,但是只能打开64K以下的文本,有没有什么办法可以突破64k的限制?
不要告诉我用CRichEdit啊。

解决方案 »

  1.   

    Win2k以下不能.除非....
    除非你自己画...
    自己定义文档....
      

  2.   

    Win2k也不能打开64k以上的文本,不信可以试试vc的例子superedit
    2k下记事本倒是可以打开64k以上的文本,不知是怎么做的?
      

  3.   

    hehe ,codeguru.com上面有一个,以前我见过。
      

  4.   

    codeguru.com这么大,没找到啊,帮帮忙吧
      

  5.   

    98下面连记事本都打不开大文件
    在2000,xp下面没有限制
    或者用richedit。
      

  6.   

    CEdit有个SetLimitText( UINT nMax )如果要在98下大于64K,可以用这个设置。CString strBuffer;
    ....
    if(pEdit->GetLimitText() > strBuffer.GetLength()){
        pEdit->SetLimitText( strBuffer.GetLength() );
        pEdit->SetWindowText(strBuffer);
    }
      

  7.   

    CEdit::SetLimitTextEdit controls on Windows NT/ 2000: For single-line edit controls, the text limit is either 0x7FFFFFFE bytes or the value of the wParam parameter, whichever is smaller. For multiline edit controls, this value is either –1 bytes or the value of the wParam parameter, whichever is smaller.Edit controls on Windows 95/98: For single-line edit controls, the text limit is either 0x7FFE bytes or the value of the wParam parameter, whichever is smaller. For multiline edit controls, this value is either 0xFFFF bytes or the value of the wParam parameter, whichever is smaller.
      

  8.   

    SetLimitText试过了,好象不管用啊
      

  9.   

    Draw it by urself.
      

  10.   

    我有个折衷的办法。
    读入文件到cedit以前,做一个缓存,大于64k的数据不要放进去,到需要的时候再放进去。不过我觉得这样还不如用richedit
    ------------------------
    ::高级编程小书童::
      

  11.   

    改用CRichEdit
    否则只能自己写了