comctl32/listview: Use NMITEMACTIVATE instead of NMLISTVIEW for NM_*CLICK notifications.

This commit is contained in:
Nikolay Sivov 2009-05-28 20:33:31 +04:00 committed by Alexandre Julliard
parent a4b314f482
commit 4b73240ae4
1 changed files with 7 additions and 7 deletions

View File

@ -775,20 +775,20 @@ static inline LRESULT notify_listview(const LISTVIEW_INFO *infoPtr, INT code, LP
static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTESTINFO *lvht) static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTESTINFO *lvht)
{ {
NMLISTVIEW nmlv; NMITEMACTIVATE nmia;
LVITEMW item; LVITEMW item;
HWND hwnd = infoPtr->hwndSelf; HWND hwnd = infoPtr->hwndSelf;
TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht)); TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht));
ZeroMemory(&nmlv, sizeof(nmlv)); ZeroMemory(&nmia, sizeof(nmia));
nmlv.iItem = lvht->iItem; nmia.iItem = lvht->iItem;
nmlv.iSubItem = lvht->iSubItem; nmia.iSubItem = lvht->iSubItem;
nmlv.ptAction = lvht->pt; nmia.ptAction = lvht->pt;
item.mask = LVIF_PARAM; item.mask = LVIF_PARAM;
item.iItem = lvht->iItem; item.iItem = lvht->iItem;
item.iSubItem = 0; item.iSubItem = 0;
if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmlv.lParam = item.lParam; if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmia.lParam = item.lParam;
notify_listview(infoPtr, code, &nmlv); notify_hdr(infoPtr, code, (LPNMHDR)&nmia);
return IsWindow(hwnd); return IsWindow(hwnd);
} }