locked
list view with virtual capability RRS feed

  • Question

  • I am trying to develop a dialog based application which will host the data from SQLite db which has large amount of data, millions of records each with about hundreds of fields.

    I am predicting a slow down of application if I use any list control / view to just load all the records from the DB at once.

    Is there any built-in control in MFC or Windows SDK / VC++ to achieve this with virtual hosting capacity.


    Thanks & Regards

    Thursday, February 5, 2015 1:32 PM

Answers

  • The standard ListView has a virtual mode.  Here is an article describing its use with MFC.
    • Marked as answer by Shu 2017 Monday, February 16, 2015 11:20 AM
    Thursday, February 5, 2015 2:49 PM
  •    You just require few codes to achieve this): 

    Step-wise:

    1 Declare your CListCtrl ( its built in with MFC) as virtual list.

    2 Initialize your database in MFC

    3 SQL query the database and store only the primary keys

    4 Link the database with the control through the primary keys.

         Loading 100 million records will be almost like a spontaneous.


    • Edited by seccpur Friday, February 13, 2015 2:08 AM
    • Marked as answer by Shu 2017 Monday, February 16, 2015 11:20 AM
    Wednesday, February 11, 2015 10:27 AM

All replies

  • The standard ListView has a virtual mode.  Here is an article describing its use with MFC.
    • Marked as answer by Shu 2017 Monday, February 16, 2015 11:20 AM
    Thursday, February 5, 2015 2:49 PM
  •    You just require few codes to achieve this): 

    Step-wise:

    1 Declare your CListCtrl ( its built in with MFC) as virtual list.

    2 Initialize your database in MFC

    3 SQL query the database and store only the primary keys

    4 Link the database with the control through the primary keys.

         Loading 100 million records will be almost like a spontaneous.


    • Edited by seccpur Friday, February 13, 2015 2:08 AM
    • Marked as answer by Shu 2017 Monday, February 16, 2015 11:20 AM
    Wednesday, February 11, 2015 10:27 AM