Igor Tarasov : comctl32: Implement LVN_ODFINDITEM.
Alexandre Julliard
julliard at winehq.org
Thu Feb 19 09:18:56 CST 2009
Module: wine
Branch: master
Commit: e02d80b7752b83a828b0a2e52d422725997cd7c4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e02d80b7752b83a828b0a2e52d422725997cd7c4
Author: Igor Tarasov <tarasov.igor at gmail.com>
Date: Thu Feb 19 07:26:10 2009 +0400
comctl32: Implement LVN_ODFINDITEM.
---
dlls/comctl32/listview.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 6b89766..af84938 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -106,7 +106,6 @@
* -- LVN_GETINFOTIP
* -- LVN_HOTTRACK
* -- LVN_MARQUEEBEGIN
- * -- LVN_ODFINDITEM
* -- LVN_SETDISPINFO
* -- NM_HOVER
* -- LVN_BEGINRDRAG
@@ -1574,6 +1573,28 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
endidx=infoPtr->nItemCount;
idx=0;
}
+
+ /* Let application handle this for virtual listview */
+ if (infoPtr->dwStyle & LVS_OWNERDATA)
+ {
+ NMLVFINDITEMW nmlv;
+ LVFINDINFOW lvfi;
+
+ ZeroMemory(&lvfi, sizeof(lvfi));
+ lvfi.flags = (LVFI_WRAP | LVFI_PARTIAL);
+ infoPtr->szSearchParam[infoPtr->nSearchParamLength] = '\0';
+ lvfi.psz = infoPtr->szSearchParam;
+ nmlv.iStart = idx;
+ nmlv.lvfi = lvfi;
+
+ nItem = notify_hdr(infoPtr, LVN_ODFINDITEMW, (LPNMHDR)&nmlv.hdr);
+
+ if (nItem != -1)
+ LISTVIEW_KeySelection(infoPtr, nItem);
+
+ return 0;
+ }
+
do {
if (idx == infoPtr->nItemCount) {
if (endidx == infoPtr->nItemCount || endidx == 0)
@@ -5075,6 +5096,17 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
POINT Position, Destination;
LVITEMW lvItem;
+ /* Search in virtual listviews should be done by application, not by
+ listview control, so we just send LVN_ODFINDITEMW and return the result */
+ if (infoPtr->dwStyle & LVS_OWNERDATA)
+ {
+ NMLVFINDITEMW nmlv;
+
+ nmlv.iStart = nStart;
+ nmlv.lvfi = *lpFindInfo;
+ return notify_hdr(infoPtr, LVN_ODFINDITEMW, (LPNMHDR)&nmlv.hdr);
+ }
+
if (!lpFindInfo || nItem < 0) return -1;
lvItem.mask = 0;
More information about the wine-cvs
mailing list