Callback
Task :
The list control program should be modified so that the text in the new list is obtained by transfering the data by pointers. This way it is not stored twice and the coding becomes more conscise.
Instructions :
- Set the pszText member of the ListCtrl to LPSTR_TEXTCALLBACK.
- Add the LVN_GETDISPINFO windows message handler to the ListCtrl.
- Edit the code in this function to allow the text to be obtained from the old list.
- Repeat this for the image.
- Delete the old lines of code which are no longer required.
Help :
The MSDN library again is the recommended source of help.
Click here for a worked example
Click here for the source code
Click here to return to menu