Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

30k Boundary in EDITTEXT Control

Ed HallEd Hall Member Posts: 395
I appear to have hit a 30k boundary in my use of an EDITTEXT control in my Win32 program. I have everything initialized at 100k, but within the EDITTEXT control, everything stops at exactly 30000 characters. I've altered some of my other memory intensive arrays with no change to the 30000 limit.

Any insight for me?

Take Care,
Ed

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : I appear to have hit a 30k boundary in my use of an EDITTEXT control
    : in my Win32 program. I have everything initialized at 100k, but
    : within the EDITTEXT control, everything stops at exactly 30000
    : characters. I've altered some of my other memory intensive arrays
    : with no change to the 30000 limit.
    :
    : Any insight for me?
    :
    : Take Care,
    : Ed
    :
    [color=Blue][link=http://msdn.microsoft.com/en-us/library/bb761607(VS.85).aspx]http://msdn.microsoft.com/en-us/library/bb761607(VS.85).aspx[/link][/color]
  • Ed HallEd Hall Member Posts: 395
    Thanks, and how disappointing.:-(

    According to MS, my multiline control can't handle any more than 64k if running on an XP, (even though this XP is only returning 30k.

    I'm using my edit control to display results of a competiton in which I had hoped to support more than this limit will allow. Now I'll have to find some other route. I also noticed that ALL edit controls in a single dialog use the same heap, so it would not help to add more edits.

    Oh well, thanks again for the link and assistance...

    Take Care,
    Ed
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : Thanks, and how disappointing.:-(
    :
    : According to MS, my multiline control can't handle any more than 64k
    : if running on an XP, (even though this XP is only returning 30k.
    :
    : I'm using my edit control to display results of a competiton in
    : which I had hoped to support more than this limit will allow. Now
    : I'll have to find some other route. I also noticed that ALL edit
    : controls in a single dialog use the same heap, so it would not help
    : to add more edits.
    :
    : Oh well, thanks again for the link and assistance...
    :
    : Take Care,
    : Ed
    :
    [color=Blue]Something is not right... I used EDIT boxes up to 512Kb of text (using this message) and there was no issues.

    Also, there should be no connection with a number of controls and how much text they support in union.

    Do you use Rich Edit?
    If so, then check that link on EM_LIMITTEXT - down below it says that for Rich Edit there is also EM_EXLIMITTEXT or something like that.[/color]
  • Ed HallEd Hall Member Posts: 395
    I'm not using (or familiar with) Rich Edit. Here's my dialog:

    [code]
    ID_PAGES_RESULTS DIALOG DISCARDABLE 0, 0, 500, 400
    STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
    CAPTION "Match Tracker Results"
    FONT 9, "Lucida Console"
    BEGIN

    PUSHBUTTON "Close",ID_FILE_EXIT,50,380,40,14
    PUSHBUTTON "Save As:",ID_FILE_SAVE,110,380,38,14
    EDITTEXT IDC_TITLE,150,380,100,14, ES_AUTOHSCROLL
    EDITTEXT IDC_RESULT,0,0,490,360,ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | ES_MULTILINE | WS_VSCROLL | WS_HSCROLL

    END
    [/code]

    and I invoke it via:

    [code]
    int ret = DialogBox(GetModuleHandle(NULL),
    MAKEINTRESOURCE(ID_PAGES_RESULTS), hwnd, ResultsDlgProc);
    [/code]

    I had read the following in your reference:

    [code]
    Edit controls on Windows 95/98/Me: 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.
    [/code]

    and, I had envisioned this program to possibly bring some older machines out of the closets for use at the competitions. Those old machines might just be running Win98:-)

    However, I would like to pursue this further, but I'm also short on time for the next few days.

    I don't remember now what I had tried to make this work in a dialog, but if I get a chance, I'll jump in again and make some notes.

    Thanks for all the help.

    [blue]Edit for update:

    This is the line I've tried in several places in my code:

    [code]
    SendMessage((HWND)ID_PAGES_RESULTS,EM_LIMITTEXT,15000,0);
    [/code]

    No matter what value I try, the characters returned are a maximum of exactly 30000.[/blue]

    Take Care,
    Ed
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : This is the line I've tried in several places in my code:
    :
    : [code]:
    : SendMessage([color=Red]GetDlgItem (hDlg, ID_PAGES_RESULTS)[/color],EM_LIMITTEXT,15000,0);
    : [/code]:
    :
    : No matter what value I try, the characters returned are a maximum of
    : exactly 30000.[/blue]
    :
    : Take Care,
    : Ed
    :
    [color=Blue]If you planning for Win9x - then yes - you will have that limit. What do you need this edit for? If only for logging, like appending lines and then scroll up and down with no editing capability - I can probably make that in short time.[/color]
  • Ed HallEd Hall Member Posts: 395
    : [color=Blue]If you planning for Win9x - then yes - you will have
    : that limit. What do you need this edit for? If only for logging,
    : like appending lines and then scroll up and down with no editing
    : capability - I can probably make that in short time.[/color]
    Thanks, but I'll come up with something when I have a little more time. My intention is an edit box with all the competitors broken down into their sections and the ability to tweak it prior to printing. The tweaking might include Title and date change, tie breaking info, etc. It looks like it can currently work for around 100 competitors, which is enough for now, anyway. Perhaps as I learn some more, I'll discover a way to get more space.

    Thanks again for your help.

    Take Care,
    Ed
Sign In or Register to comment.