Hi, does anyone know what is the maximum amount of text that a text box will accept?
I am using Microsoft VC++ 6 and MFC.
Printable View
Hi, does anyone know what is the maximum amount of text that a text box will accept?
I am using Microsoft VC++ 6 and MFC.
The standard edit control can accept 30,000 characters maximum.
Wouldn't it probably be a power of 2 like 32 768?
The upper limit is determined by the operating system, and is indeed a power of two. If the application does not manually set the upper limit, the edit control is constrained to 32,767 bytes by default. On NT-based systems, the absolute maximum is theoretically 2 GB; on other Windows systems, the maximum is again 32,767 bytes.
I would have assumed so, but I read that it was 30,000 exactly. I assumed this was an error, so I tried it out myself on my WinXP system, and pasted text in there until it could take no more. I selected all the text and pasted it into notepad, and saved the file. It was exactly 30,000 bytes. I have just confirmed this, as well on a Win98 system... 30,000 bytes, again. This is a standard edit control with no code to change the upper limit.Quote:
Originally posted by XSquared
Wouldn't it probably be a power of 2 like 32 768?