Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
850ea2a7
Commit
850ea2a7
authored
Nov 22, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Add support for LVFI_SUBSTRING.
parent
b7b7b711
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
8 deletions
+40
-8
listview.c
dlls/comctl32/listview.c
+5
-3
listview.c
dlls/comctl32/tests/listview.c
+29
-0
commctrl.h
include/commctrl.h
+6
-5
No files found.
dlls/comctl32/listview.c
View file @
850ea2a7
...
...
@@ -5888,7 +5888,8 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
if
(
!
lpFindInfo
||
nItem
<
0
)
return
-
1
;
lvItem
.
mask
=
0
;
if
(
lpFindInfo
->
flags
&
(
LVFI_STRING
|
LVFI_PARTIAL
))
if
(
lpFindInfo
->
flags
&
(
LVFI_STRING
|
LVFI_PARTIAL
)
||
lpFindInfo
->
flags
&
LVFI_SUBSTRING
)
{
lvItem
.
mask
|=
LVIF_TEXT
;
lvItem
.
pszText
=
szDispText
;
...
...
@@ -5952,7 +5953,7 @@ again:
if
(
lvItem
.
mask
&
LVIF_TEXT
)
{
if
(
lpFindInfo
->
flags
&
LVFI_PARTIAL
)
if
(
lpFindInfo
->
flags
&
(
LVFI_PARTIAL
|
LVFI_SUBSTRING
)
)
{
WCHAR
*
p
=
strstrW
(
lvItem
.
pszText
,
lpFindInfo
->
psz
);
if
(
!
p
||
p
!=
lvItem
.
pszText
)
continue
;
...
...
@@ -6009,7 +6010,8 @@ again:
static
INT
LISTVIEW_FindItemA
(
const
LISTVIEW_INFO
*
infoPtr
,
INT
nStart
,
const
LVFINDINFOA
*
lpFindInfo
)
{
BOOL
hasText
=
lpFindInfo
->
flags
&
(
LVFI_STRING
|
LVFI_PARTIAL
);
BOOL
hasText
=
lpFindInfo
->
flags
&
(
LVFI_STRING
|
LVFI_PARTIAL
)
||
lpFindInfo
->
flags
&
LVFI_SUBSTRING
;
LVFINDINFOW
fiw
;
INT
res
;
LPWSTR
strW
=
NULL
;
...
...
dlls/comctl32/tests/listview.c
View file @
850ea2a7
...
...
@@ -4128,6 +4128,35 @@ static void test_finditem(void)
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
-
1
,
r
);
/* try with LVFI_SUBSTRING */
strcpy
(
f
,
"fo"
);
fi
.
flags
=
LVFI_SUBSTRING
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
if
(
r
==
-
1
)
{
win_skip
(
"LVFI_SUBSTRING not supported
\n
"
);
DestroyWindow
(
hwnd
);
return
;
}
expect
(
0
,
r
);
strcpy
(
f
,
"f"
);
fi
.
flags
=
LVFI_SUBSTRING
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
0
,
r
);
strcpy
(
f
,
"o"
);
fi
.
flags
=
LVFI_SUBSTRING
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
-
1
,
r
);
strcpy
(
f
,
"f"
);
fi
.
flags
=
LVFI_SUBSTRING
|
LVFI_STRING
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
0
,
r
);
DestroyWindow
(
hwnd
);
}
...
...
include/commctrl.h
View file @
850ea2a7
...
...
@@ -3023,11 +3023,12 @@ static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
#define LVSICF_NOSCROLL 0x0002
#define LVFI_PARAM 0X0001
#define LVFI_STRING 0X0002
#define LVFI_PARTIAL 0X0008
#define LVFI_WRAP 0X0020
#define LVFI_NEARESTXY 0X0040
#define LVFI_PARAM 0x0001
#define LVFI_STRING 0x0002
#define LVFI_SUBSTRING 0x0004
#define LVFI_PARTIAL 0x0008
#define LVFI_WRAP 0x0020
#define LVFI_NEARESTXY 0x0040
#define LVIF_TEXT 0x0001
#define LVIF_IMAGE 0x0002
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment