[1/4] comctl32/listview: Use NMITEMACTIVATE instead of NMLISTVIEW for NM_*CLICK notifications
Nikolay Sivov
bunglehead at gmail.com
Fri May 29 05:03:51 CDT 2009
According to MSDN NMLISTVIEW was substituted with NMITEMACTIVATE
for NM_*CLICK notification on >=IE4. Actualy NMITEMACTIVATE is
one additional field longer then NMLISTVIEW. So it's better
to use larger one cause applications could try to read this field.
Changelog:
- Use NMITEMACTIVATE instead of NMLISTVIEW for NM_*CLICK notifications
>From 12a8b99f2fdb870e165758fd941a0558b7623fc6 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Thu, 28 May 2009 20:33:31 +0400
Subject: Use NMITEMACTIVATE instead of NMLISTVIEW for NM_*CLICK notifications
---
dlls/comctl32/listview.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 140f60d..fb1828e 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -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)
{
- NMLISTVIEW nmlv;
+ NMITEMACTIVATE nmia;
LVITEMW item;
HWND hwnd = infoPtr->hwndSelf;
TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht));
- ZeroMemory(&nmlv, sizeof(nmlv));
- nmlv.iItem = lvht->iItem;
- nmlv.iSubItem = lvht->iSubItem;
- nmlv.ptAction = lvht->pt;
+ ZeroMemory(&nmia, sizeof(nmia));
+ nmia.iItem = lvht->iItem;
+ nmia.iSubItem = lvht->iSubItem;
+ nmia.ptAction = lvht->pt;
item.mask = LVIF_PARAM;
item.iItem = lvht->iItem;
item.iSubItem = 0;
- if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmlv.lParam = item.lParam;
- notify_listview(infoPtr, code, &nmlv);
+ if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmia.lParam = item.lParam;
+ notify_hdr(infoPtr, code, (LPNMHDR)&nmia);
return IsWindow(hwnd);
}
--
1.5.6.5
More information about the wine-patches
mailing list