Skip to content

Commit df73a67

Browse files
authored
Fix sample associated with CListBox::InitStorage
1 parent 67afcae commit df73a67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/mfc/codesnippet/CPP/clistbox-class_23.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Initialize the storage of the list box to be 256 strings with
2-
// about 10 characters per string, performance improvement.
3-
int n = m_myListBox.InitStorage(256, 16 * sizeof(TCHAR));
1+
// Reserve space in the list box for 256 additional strings with
2+
// about 15 characters per string.
3+
int n = m_myListBox.InitStorage(256, 256 * (15 + 1) * sizeof(TCHAR));
44
ASSERT(n != LB_ERRSPACE);
55

66
// Add 256 items to the list box.

0 commit comments

Comments
 (0)