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.
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.
zMan
The standard edit control can accept 30,000 characters maximum.
Wouldn't it probably be a power of 2 like 32 768?
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
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.
"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
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.Originally posted by XSquared
Wouldn't it probably be a power of 2 like 32 768?
Last edited by JasonD; 06-21-2003 at 01:40 PM.