?
Solved

does GetListInfo() works with GetItemData()?

Posted on 2006-05-14
6
Medium Priority
?
280 Views
Last Modified: 2013-11-20
Hi,

I am having a problem in List control, i using GetListInfo() ( Virtual list ) for fast retreival of data. but when i call GetItemData() it returns NULL, while there is data at the position.

Thanks in Advance
-devender
0
Comment
Question by:devendersys
  • 2
  • 2
5 Comments
 
LVL 22

Expert Comment

by:mahesh1402
ID: 16680134
have you previously called CListCtrl::SetItemData or otherwise initialized the LVITEM.lParam ?

-MAHESH
0
 

Author Comment

by:devendersys
ID: 16680169
Thanks for your reply Mahesh.
Actualy i am drawing the text, not using SetItemData(). but GetItemData(int index) accepts only index parameter.
how can we intialize to LVITEM.lParam and where?

Can you show me some code where i can initialize the LVITEM.lParam with GetItemData()?

Thanks
-devender
0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 16680266
No thats about SetItemData()..but you are not using it.

-MAHESH
0
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 90 total points
ID: 16680342
A virtual list uses callbacks for information.  *ALL* it stores is how many items there are to display.  When it requires information it callsback with the idex of the item it requires information about.
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 16877049
My comment tells him what mistake he made in his thinking.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question