November 28th, 2003, 12:13 AM
What is the maximum number of strings we can..
1) What is the maximum number of strings we can store in ListBox (Win32)?
2) if I want store more then that what should I do?
November 28th, 2003, 12:29 AM
I'm pretty sure it's only limited to your computer's hardware (i.e. if 9 billion items takes up 1GB of ram and you have 100MB, it won't go(not counting virtual memory ****))
November 28th, 2003, 12:40 AM
i have read some articles that maximum (arround) 32000 string (each string have default length) element only we can store in the ListBox. so that im wondering.
November 28th, 2003, 12:59 AM
Try to keep track on the insufficient space.....
if(temp.InsertString("abc") == LB_ERRSPACE)
//Clear the buffer of the ListBox
November 28th, 2003, 01:05 AM
I know that there is a tech. called "Virtual List Control", in fact, it is just a feature of CListCtrl, a listctrl will support this feature when you set LVS_OWNERDATA style. You can find the detail in MSDN.
I don't go any further myself, so I can't give you any more help..
Nothing changes, but us.
November 28th, 2003, 01:27 AM
Im using pure win32 application not MFC, then how can I do this.
(Virtual list control supported by MFC)
November 28th, 2003, 12:25 PM
a CListBox is limited to 2^15-1 items.
Theoretically a CListCtrl is limited to 2^31-1 items, because that's the range of allowed indices, but the actual count will be much lower due to memory constraints.
The max number of items (if the listcontrol doesn't store the strings, but retrieves them dynamically) is about 90,000,000.
Click Here to Expand Forum to Full Width