CListCtrl::OnCustomdrawCListCtrl(NMHDR* pNMHDR, LRESULT* pResult)
-
Hello Comunity, i use this funktion to show items in an CListCtrl with diferent colors, and i need to know which item number is to be drawn. I try to cast pNMHDR to LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR; but i need to know the itemnumber who is to drawn... any one have some sugestions for me? thaks break;
-
Hello Comunity, i use this funktion to show items in an CListCtrl with diferent colors, and i need to know which item number is to be drawn. I try to cast pNMHDR to LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR; but i need to know the itemnumber who is to drawn... any one have some sugestions for me? thaks break;
If no other solution, I think you can store the item number as a private data:
lvItem.mask = ... | LVIF_PARAM; . . . lvItem.lParam = (LPARAM)i; pMatrixListResults->InsertItem(&lvItem);
Later obtain this number from the
NMCUSTOMDRAW
structure:LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR; int number = (int)pLVCD->nmcd.lItemlParam;
I hope this works.
-
Hello Comunity, i use this funktion to show items in an CListCtrl with diferent colors, and i need to know which item number is to be drawn. I try to cast pNMHDR to LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR; but i need to know the itemnumber who is to drawn... any one have some sugestions for me? thaks break;
-
If no other solution, I think you can store the item number as a private data:
lvItem.mask = ... | LVIF_PARAM; . . . lvItem.lParam = (LPARAM)i; pMatrixListResults->InsertItem(&lvItem);
Later obtain this number from the
NMCUSTOMDRAW
structure:LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR; int number = (int)pLVCD->nmcd.lItemlParam;
I hope this works.
-
Hello Comunity, i use this funktion to show items in an CListCtrl with diferent colors, and i need to know which item number is to be drawn. I try to cast pNMHDR to LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR; but i need to know the itemnumber who is to drawn... any one have some sugestions for me? thaks break;
LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR;
int nItem = (int) pLVCD->nmcd.dwItemSpec;--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)pNMHDR;
int nItem = (int) pLVCD->nmcd.dwItemSpec;--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ