diff --git a/docs/mfc/codesnippet/CPP/clistbox-class_23.cpp b/docs/mfc/codesnippet/CPP/clistbox-class_23.cpp index ef804e6707e..4b00182aa22 100644 --- a/docs/mfc/codesnippet/CPP/clistbox-class_23.cpp +++ b/docs/mfc/codesnippet/CPP/clistbox-class_23.cpp @@ -1,6 +1,6 @@ // Initialize the storage of the list box to be 256 strings with // about 10 characters per string, performance improvement. - int n = m_myListBox.InitStorage(256, 10); + int n = m_myListBox.InitStorage(256, 16*sizeof(TCHAR)); ASSERT(n != LB_ERRSPACE); // Add 256 items to the list box. @@ -9,4 +9,4 @@ { str.Format(_T("item string %d"), i); m_myListBox.AddString( str ); - } \ No newline at end of file + }