MFC中的虚拟组合框 [英] Virtual combo box in MFC

查看:84
本文介绍了MFC中的虚拟组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在标签页中有10个组合框,我想在每个组合框中加载10k数据?



标签页需要花费更多时间才能加载。



在MFC中如何实现虚拟组合框虚拟列表控件?



我需要在OnInitDialog()的CComboBox中选择默认字符串。



你能不能有人给我一些想法?



谢谢



我的尝试:



我没有通过谷歌搜索找到任何东西。

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.

推荐答案

我不知道有关虚拟组合的任何官方文档框。您必须编写自己的控件或在Web上查找现有控件。



包含大约10k条目的组合框列表不是用户友好的。找到想要的元素时,需要多长时间才能找到它(将显示的项目与想要的项目进行比较)?

我建议考虑更友好的用户解决方案。



但是,使用 CComboBox :: InitStorage [ ^ ]功能。虽然这会占用更多内存(您必须指定所有项目的最大字符串长度),但它会在添加时避免为每个元素进行动态分配。
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.


这篇关于MFC中的虚拟组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆