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.
精彩评论