Commit e02d80b7 authored by Igor Tarasov's avatar Igor Tarasov Committed by Alexandre Julliard

comctl32: Implement LVN_ODFINDITEM.

parent 73b490b5
...@@ -106,7 +106,6 @@ ...@@ -106,7 +106,6 @@
* -- LVN_GETINFOTIP * -- LVN_GETINFOTIP
* -- LVN_HOTTRACK * -- LVN_HOTTRACK
* -- LVN_MARQUEEBEGIN * -- LVN_MARQUEEBEGIN
* -- LVN_ODFINDITEM
* -- LVN_SETDISPINFO * -- LVN_SETDISPINFO
* -- NM_HOVER * -- NM_HOVER
* -- LVN_BEGINRDRAG * -- LVN_BEGINRDRAG
...@@ -1574,6 +1573,28 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L ...@@ -1574,6 +1573,28 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
endidx=infoPtr->nItemCount; endidx=infoPtr->nItemCount;
idx=0; 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 { do {
if (idx == infoPtr->nItemCount) { if (idx == infoPtr->nItemCount) {
if (endidx == infoPtr->nItemCount || endidx == 0) if (endidx == infoPtr->nItemCount || endidx == 0)
...@@ -5075,6 +5096,17 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart, ...@@ -5075,6 +5096,17 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
POINT Position, Destination; POINT Position, Destination;
LVITEMW lvItem; 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; if (!lpFindInfo || nItem < 0) return -1;
lvItem.mask = 0; lvItem.mask = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment