Problem with ListView API : LVM_ISERTITEM
-
this pice of code doesn't work :(
case LVM_INSERTITEM: { LV_ITEM FAR* pitem = (LV_ITEM FAR*) lParam; if(!pitem && !pitem->pszText) break; if( pitem->mask & LVIF_TEXT == LVIF_TEXT && pitem->cchTextMax>0) { MessageBox(okno,pitem->pszText,":-)",MB_OK); } break;
any other ideas :confused: :mad::mad: Pain is a weakness living the bodyTry using brackets to delimit each expression you are testing in the
if
statement. Bikram Singh -
this pice of code doesn't work :(
case LVM_INSERTITEM: { LV_ITEM FAR* pitem = (LV_ITEM FAR*) lParam; if(!pitem && !pitem->pszText) break; if( pitem->mask & LVIF_TEXT == LVIF_TEXT && pitem->cchTextMax>0) { MessageBox(okno,pitem->pszText,":-)",MB_OK); } break;
any other ideas :confused: :mad::mad: Pain is a weakness living the body -
What happens if pitem != NULL and pitem->pszText = NULL? (Hint: It wont break) I would do the test: if(pitem && pitem->pszText) { // Do the dance... } Papa while (TRUE) Papa.WillLove ( Bebe ) ;
Not working hmmm hardcore hehe. Im testing changing iImage value according to iItem and it seems to be good if I know sequence of adding apriori, which will require some more coding. Anyway its really strage stuff isn't it :confused: Pain is a weakness living the body
-
Not working hmmm hardcore hehe. Im testing changing iImage value according to iItem and it seems to be good if I know sequence of adding apriori, which will require some more coding. Anyway its really strage stuff isn't it :confused: Pain is a weakness living the body
-
Try this case LVM_INSERTITEM: { LPLVITEM pitem = (LPLVITEM) lParam; if(pitem && pitem->pszText) { if( ((pitem->mask & LVIF_TEXT) == LVIF_TEXT)) { MessageBox(okno,pitem->pszText,"",MB_OK); } } break; Papa while (TRUE) Papa.WillLove ( Bebe ) ;
-
Not working. Plese remind me next time do not take a project for windows. Pain is a weakness living the body
-
Not working. Plese remind me next time do not take a project for windows. Pain is a weakness living the body
-
What happens if pitem != NULL and pitem->pszText = NULL? (Hint: It wont break) I would do the test: if(pitem && pitem->pszText) { // Do the dance... } Papa while (TRUE) Papa.WillLove ( Bebe ) ;
I would do:
if(pitem) { if(pitem->pszText) { // Do the dance... } }
Bikram Singh -
-
I would do:
if(pitem) { if(pitem->pszText) { // Do the dance... } }
Bikram Singhnot working too i think this not valid pointer beacuse its not the same address space I had the similar problem some time ago when i wannted to send some char * as wparam or lparam using SendMessage. I had to use WM_COPYDATA then char * goes thru kernel memory and pointer is valid:confused: Pain is a weakness living the body