Added dummy code to evaluate LVM_SUBITEMHITTEST. The code will remain, but will be #if'd out.

This commit is contained in:
Pietro Gagliardi 2018-06-17 09:29:29 -04:00
parent 7bc121b1ec
commit db2f3352c4
1 changed files with 21 additions and 0 deletions

View File

@ -162,6 +162,27 @@ static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nmhdr, LRESULT *lResult)
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
case NM_CLICK:
#if 1
{
NMITEMACTIVATE *nm = (NMITEMACTIVATE *) nmhdr;
LVHITTESTINFO ht;
WCHAR buf[256];
ZeroMemory(&ht, sizeof (LVHITTESTINFO));
ht.pt = nm->ptAction;
if (SendMessageW(t->hwnd, LVM_SUBITEMHITTEST, 0, (LPARAM) (&ht)) == (LRESULT) (-1))
MessageBoxW(GetAncestor(t->hwnd, GA_ROOT), L"No hit", L"No hit", MB_OK);
else {
wsprintf(buf, L"item %d subitem %d htflags 0x%I32X",
ht.iItem, ht.iSubItem, ht.flags);
MessageBoxW(GetAncestor(t->hwnd, GA_ROOT), buf, buf, MB_OK);
}
}
#else
#endif
*lResult = 0;
return TRUE;
} }
return FALSE; return FALSE;
} }