The information in this article applies to:
SUMMARY
In the Microsoft Windows graphical environment, the amount of text
that a user can enter into a multiline edit control is limited by the
number of characters the user can type into the edit control (set
using the EM_LIMITTEXT message) and by the size of the buffer the edit
control uses to hold the text.
MORE INFORMATION
Initially, the user can enter a maximum of 30,000 bytes into a
multiline edit control. If the user attempts to enter more text, the
edit control beeps and does not accept the characters. An application
can set this limit to any value between 1 and 65,535 (0xFFFF)
characters by sending the edit control an EM_LIMITTEXT message.
An application can specify a global text buffer for an edit control. By using a global buffer, an edit control can store almost 64K of data. The actual size limit of an edit control depends on the number of lines stored in the edit control. Edit controls contain a dynamically allocated buffer, which contains offsets into the text buffer for each line. Because each line requires 2 bytes of storage, the buffer grows as the number of lines in the edit control grows. In addition to the buffer, there are slightly less than 100 bytes of fixed overhead associated with an edit control. Windows does not provide any built-in method to process a single block of more than 64K of text. One major drawback of using a global memory buffer is that the EM_GETHANDLE and EM_SETHANDLE messages cannot be used to change the memory used by the edit control. Editing features such as Cut and Paste do not affect the amount of text that can be edited because Windows uses global memory to implement these features. REFERENCESFor more information on using a global memory buffer, query the Microsoft Knowledge Base on the following words: prod(winsdk) and GLBEDIT Additional query words: 3.00 3.10
Keywords : kb16bitonly kbCtrl kbEditCtrl kbSDKPlatform |
Last Reviewed: June 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |