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
4e00d794
Commit
4e00d794
authored
Oct 05, 2006
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Don't forget to set stateMask when calling LVM_GETITEM/LVIF_STATE.
Remove ZeroMemory() calls and instead set iSubItem = 0 manually.
parent
7edba143
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
shlview.c
dlls/shell32/shlview.c
+8
-7
No files found.
dlls/shell32/shlview.c
View file @
4e00d794
...
...
@@ -527,7 +527,7 @@ static int LV_FindItemByPidl(
LPCITEMIDLIST
pidl
)
{
LVITEMA
lvItem
;
ZeroMemory
(
&
lvItem
,
sizeof
(
LVITEMA
))
;
lvItem
.
iSubItem
=
0
;
lvItem
.
mask
=
LVIF_PARAM
;
for
(
lvItem
.
iItem
=
0
;
SendMessageA
(
This
->
hWndList
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
lvItem
);
...
...
@@ -552,9 +552,9 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
TRACE
(
"(%p)(pidl=%p)
\n
"
,
This
,
pidl
);
ZeroMemory
(
&
lvItem
,
sizeof
(
lvItem
));
/* create the listview item*/
lvItem
.
mask
=
LVIF_TEXT
|
LVIF_IMAGE
|
LVIF_PARAM
;
/*set the mask*/
lvItem
.
iItem
=
ListView_GetItemCount
(
This
->
hWndList
);
/*add the item to the end of the list*/
lvItem
.
iSubItem
=
0
;
lvItem
.
lParam
=
(
LPARAM
)
ILClone
(
ILFindLastID
(
pidl
));
/*set the item's data*/
lvItem
.
pszText
=
LPSTR_TEXTCALLBACKA
;
/*get text on a callback basis*/
lvItem
.
iImage
=
I_IMAGECALLBACK
;
/*get the image on a callback basis*/
...
...
@@ -587,7 +587,6 @@ static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCIT
nItem
=
LV_FindItemByPidl
(
This
,
ILFindLastID
(
pidlOld
));
if
(
-
1
!=
nItem
)
{
ZeroMemory
(
&
lvItem
,
sizeof
(
lvItem
));
/* create the listview item*/
lvItem
.
mask
=
LVIF_PARAM
;
/* only the pidl */
lvItem
.
iItem
=
nItem
;
SendMessageA
(
This
->
hWndList
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
lvItem
);
...
...
@@ -826,9 +825,10 @@ static UINT ShellView_GetSelections(IShellViewImpl * This)
{
TRACE
(
"-- Items selected =%u
\n
"
,
This
->
cidl
);
ZeroMemory
(
&
lvItem
,
sizeof
(
lvItem
));
lvItem
.
mask
=
LVIF_STATE
|
LVIF_PARAM
;
lvItem
.
stateMask
=
LVIS_SELECTED
;
lvItem
.
iItem
=
0
;
lvItem
.
iSubItem
=
0
;
while
(
ListView_GetItemA
(
This
->
hWndList
,
&
lvItem
)
&&
(
i
<
This
->
cidl
))
{
...
...
@@ -1429,8 +1429,8 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
WCHAR
wszNewName
[
MAX_PATH
];
LVITEMA
lvItem
;
ZeroMemory
(
&
lvItem
,
sizeof
(
LVITEMA
));
lvItem
.
iItem
=
lpdi
->
item
.
iItem
;
lvItem
.
iSubItem
=
0
;
lvItem
.
mask
=
LVIF_PARAM
;
SendMessageA
(
This
->
hWndList
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
lvItem
);
...
...
@@ -1979,9 +1979,10 @@ static HRESULT WINAPI IShellView_fnSelectItem(
if
(
uFlags
&
SVSI_ENSUREVISIBLE
)
SendMessageW
(
This
->
hWndList
,
LVM_ENSUREVISIBLE
,
i
,
0
);
ZeroMemory
(
&
lvItem
,
sizeof
(
LVITEMA
));
lvItem
.
mask
=
LVIF_STATE
;
lvItem
.
stateMask
=
LVIS_SELECTED
|
LVIS_FOCUSED
;
lvItem
.
iItem
=
0
;
lvItem
.
iSubItem
=
0
;
while
(
SendMessageA
(
This
->
hWndList
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
lvItem
))
{
...
...
@@ -2261,9 +2262,9 @@ static HRESULT drag_notify_subitem(IShellViewImpl *This, DWORD grfKeyState, POIN
}
else
{
/* Query the relative PIDL of the shellfolder object represented by the currently
* dragged over listview-item ... */
ZeroMemory
(
&
lvItem
,
sizeof
(
lvItem
));
lvItem
.
mask
=
LVIF_PARAM
;
lvItem
.
iItem
=
lResult
;
lvItem
.
iSubItem
=
0
;
SendMessageA
(
This
->
hWndList
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
lvItem
);
/* ... and bind pCurDropTarget to the IDropTarget interface of an UIObject of this object */
...
...
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