Click here to Skip to main content
16,005,120 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have 10 combobox in a tab page and I want to load 10k data to each combobox?

It is taking more time for the tab page to get loaded.

In MFC how to implement virtual combobox like virtual list control?

I need to select default string in CComboBox on OnInitDialog().

Can you please someone give me some ideas?

Thanks

What I have tried:

I did not finding anything through google search.
Posted
Updated 2-Aug-18 22:52pm
v2
Comments
Richard MacCutchan 3-Aug-18 6:25am    
10 ComboBoxes with 10,000 items in each is obviously going to take a lot of time to load. I would suggest that your design needs a complete rethink.

1 solution

I don't know of any official documentation about virtual combo boxes. You would have to write your own control or check the web for existing ones.

A combo box list with about 10k entries is not user friendly. How long does it take to find the wanted element when it is near the end while having to look for it (compare the shown items with the wanted one)?
I suggest to think about a more user friendly solution.

However, you can speed up the creation time dramatically by using the CComboBox::InitStorage[^] function. While that uses more memory (you have to specify the max. string length of all items), it avoids dynamic allocation for each element upon adding.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900