C/C++ Windows API

Moderators: Lundin
Number of threads: 450
Number of posts: 1225

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
30k Boundary in EDITTEXT Control Posted by Ed Hall on 22 Nov 2008 at 9:55 PM
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
Report
Re: 30k Boundary in EDITTEXT Control Posted by AsmGuru62 on 23 Nov 2008 at 5:37 AM
: 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
:
http://msdn.microsoft.com/en-us/library/bb761607(VS.85).aspx
Report
Re: 30k Boundary in EDITTEXT Control Posted by Ed Hall on 23 Nov 2008 at 8:57 AM
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
Report
Re: 30k Boundary in EDITTEXT Control Posted by AsmGuru62 on 24 Nov 2008 at 4:49 AM
: 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
:
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.
Report
Re: 30k Boundary in EDITTEXT Control Posted by Ed Hall on 24 Nov 2008 at 2:47 PM
I'm not using (or familiar with) Rich Edit. Here's my dialog:

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


and I invoke it via:

   int ret = DialogBox(GetModuleHandle(NULL), 
      MAKEINTRESOURCE(ID_PAGES_RESULTS), hwnd, ResultsDlgProc);


I had read the following in your reference:

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.


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.

Edit for update:

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

  SendMessage((HWND)ID_PAGES_RESULTS,EM_LIMITTEXT,15000,0);


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


Take Care,
Ed
Report
Re: 30k Boundary in EDITTEXT Control Posted by AsmGuru62 on 25 Nov 2008 at 5:23 AM
: This is the line I've tried in several places in my code:
:
:
: 
:   SendMessage(GetDlgItem (hDlg, ID_PAGES_RESULTS),EM_LIMITTEXT,15000,0);
: 
:
:
: No matter what value I try, the characters returned are a maximum of
: exactly 30000.[/blue]
:
: Take Care,
: Ed
:
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.
Report
Re: 30k Boundary in EDITTEXT Control Posted by Ed Hall on 25 Nov 2008 at 8:35 PM
: 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.

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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.