Skip to content

Commit b754c12

Browse files
authored
Typos and give specific calculation formula
1 parent df73a67 commit b754c12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/mfc/reference/clistbox-class.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,9 @@ If successful, the maximum number of items that the list box can store before a
886886
887887
You can call this function before adding a large number of items to a `CListBox`.
888888
889-
This function helps speed up the initialization of list boxes that have a large number of items (more than 100). It preallocates the specified amount of memory so that subsequent [`AddString`](#addstring), [`InsertString`](#insertstring), and [`Dir`](#dir) functions are more efficient. You can use estimates for the parameters. If you overestimate, the extra rmemory remains allocated; if you underestimate, the list box will allocate additional memory as necessary.
889+
This function helps speed up the initialization of list boxes that have a large number of items (more than 100). It preallocates the specified amount of memory so that subsequent [`AddString`](#addstring), [`InsertString`](#insertstring), and [`Dir`](#dir) functions are more efficient. You can use estimates for the parameters. If you overestimate, the extra memory remains allocated; if you underestimate, the list box will allocate additional memory as necessary.
890+
891+
The memory required to store a string includes the null terminator. Therefore, if you plan to add 100 strings, each with a length of 10 characters, you would pass a *wParam* of 100 and an *lParam* of 100 × (10 + 1) × sizeof(TCHAR).
890892
891893
Windows 95/98 only: The *`nItems`* parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size of the items in a list box is limited only by available memory.
892894

0 commit comments

Comments
 (0)