Delete LVITEM message WinApi

Hi it's possible to delete a LVITEM of winapi form¿??.. My winapi function will show a list of items and i search my item with the follow way..

1
2
3
4
5
6
7
8
9
10
static const wchar_t *item=L"ITEM OR MY PROGRAM";

if ( msg == LVM_INSERTITEMW || msg == LVM_SETITEMW)
    {
        if (!lstrcmpW(((LVITEMW*)lparam)->pszText, item))
        {
	    //here i will delete this item 		
            return false;
        }
    }


I include this because normally the items are included using LVM_INSERTITEM or the LVM_SETITEM, so if it's the same item then i will not show it but my subitems are visibles....example:

ITEM1 SUBITEM1 SUBITEM2 SUBITEM3 SUBITEM4

AFTER

EMPTY SUBITEM1 SUBITEM2 SUBITEM3 SUBITEM4



Anyways i think the only way is since here.
1
2
3
4
if ( msg == LVM_INSERTITEMW || msg == LVM_SETITEMW)
    {
     return 0;
   }

But if i do this, will hide all my items.

What you recommend me to hide my item and subitems... Thanks in advance..
Last edited on
Topic archived. No new replies allowed.