开发者

MFC Virtual List Control using Database

开发者 https://www.devze.com 2022-12-22 06:46 出处:网络
Does anyone know of a good MFC example of how to create and开发者_运维百科 use a virtual list control with a database that has 100K records?I don\'t want to load in all the records at once because it

Does anyone know of a good MFC example of how to create and开发者_运维百科 use a virtual list control with a database that has 100K records? I don't want to load in all the records at once because it takes too much time. I want all updates to the list control to be fast based on user interaction.

Thanks, Mike


Something like http://www.codeguru.com/cpp/controls/listview/advanced/article.php/c4151 .

It's simple, really: make sure you set the LVS_OWNERDATA flag when creating the control (or set it in the resource editor), handle the messages that are described in MSDN under "About list-view controls", start with handling LVN_GETDISPINFO. That's mostly it, unless you want to draw the entries yourself, then you're in owner-draw territory. But start with LVS_OWNDERDRAW and LVN_GETDISPINFO.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号