[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Help with RTF Control?

I took sample from Charles Petzold poppad.  I converted the edit control to a RTF control and it compiles and runs ok.  But when I paste a large amount of data.  it doesnt seem to take the whole data.  the file size is about
is 765kb.  Can a rtf take this much data on it?  If not is there another possible way to take large standard text of data.( Playing with making my own text editor )
Here is what I did to change it

I included the following (Using VC++ 6.0 )
comctrl32.lib

the following header files:
#include <commctrl.h>
#include <richedit.h>

and created the control like so:

             hwndEdit = CreateWindow( "RichEdit", "",
                                      WS_CHILD | WS_VISIBLE | ES_MULTILINE |
                                      ES_SAVESEL | WS_HSCROLL | WS_VSCROLL,
                                      0, 0,
                                      0, 0,
                                      hwnd,
                                      (HMENU) EDITID, hInst, NULL );

And it compiles and runs but doesnt take all the data.

Any ideas.
0
eric07
Asked:
eric07
  • 2
1 Solution
 
NickRepinCommented:
SendMessage(hwndEdit,EM_EXLIMITTEXT,0,nmaxSize)

By default, RE accepts 32 or 64k
0
 
eric07Author Commented:
Thanks allot it worked great.  I noticed you can even set the size higher like 9000000.  Is there a upper bounds limit?  Can I put as much as I can and if I do what is the penalties?

Thanks
0
 
NickRepinCommented:
No penalties, if I'm not wrong.
You can set any value, but the actual text size will be limited by the available memory (including the paging file on the hard disk). Several megabytes at least.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now