CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Guest

    How much text can a CEdit control contain?

    Hi all,

    I have created a dialogbased MFC application. The dialogbox contains a normal editbox based on CEdit. I need to write at least 100kB text out in the editbox, but it will only display about 40kB of the text.

    Is this the upper limit for the CEdit control?
    Can a RichEditBox contain more text?
    Any other suggestions to how a can solve this problem?

    Thanks
    Jimmi Christensen


  2. #2
    Join Date
    May 1999
    Posts
    35

    Re: How much text can a CEdit control contain?

    Hi,

    you are right, the capacity of a CEdit control is limited (obviously it's based on 16 bit-code). If you want to display more text in your dialog, you should use a CRichEditCtrl instead.

    Greetings, Jörg



  3. #3
    Join Date
    May 1999
    Posts
    4

    Re: How much text can a CEdit control contain?

    the limit is 64k if my memory is correct...
    However, you can have an amount of text which is only limited by the amount of memory available on your computer (virtually unlimited) in a RichEdit control


  4. #4
    Join Date
    Feb 2004
    Posts
    194

    Re: How much text can a CEdit control contain?

    Quote Originally Posted by Grind
    the limit is 64k if my memory is correct...
    However, you can have an amount of text which is only limited by the amount of memory available on your computer (virtually unlimited) in a RichEdit control
    no it doesnt work
    is there some setting i must do?

  5. #5
    Join Date
    May 2006
    Location
    Norway
    Posts
    1,709

    Re: How much text can a CEdit control contain?

    to use a CRichEditCtrl you have to call the AfxInitRichEdit once before using these controls! If you have a Dialog based application I would recommend to make the call in the CWinApp derived class in the InitInstance function.

    Regards,

    Laitinen

  6. #6
    Join Date
    Jan 2002
    Location
    Houston, TX
    Posts
    1,421

    Re: How much text can a CEdit control contain?

    You can change the amount of text that a CEdit can hold by using SetLimitText.

    Hope that helps.
    Be sure to rate those who help!
    -------------------------------------------------------------
    Karl - WK5M
    PP-ASEL-IA (N43CS)
    PGP Key: 0xDB02E193
    PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured