Click to See Complete Forum and Search --> : ListView OnGetdispinfo query
MikeL
August 24th, 1999, 07:58 AM
When using OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult) with ListView the documentation says you can use LVIF_DI_SETITEM to tell the ListView to store the information for an item and not to request it again.
How!
Cheers in advance...
Isabel Planells
August 24th, 1999, 10:56 AM
Hi!
Did you try this?
[ccode]
void CMyList::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult)
{
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
// TODO: Add your control notification handler code here
if(pDispInfo->item.mask & TVIF_IMAGE)// Check for the info he needs
{
pDispInfo->item.iImage=0; // Set the info he needs
pDispInfo->item.mask |=LVIF_DI_SETITEM;
}
[...]
}
I hope it helps!
Isabel Planells
MikeL
August 24th, 1999, 11:06 AM
Yeah, that is exactly how I thought it should work, but the ListView still insists on requesting for the same information again and again (ie. every time the cursor is moved)
Do you (does anyone) have a working example?
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.