Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
69f2e04f
Commit
69f2e04f
authored
Apr 21, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Apr 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleting column zero should only delete the column and not the item
data.
parent
759ef459
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
listview.c
dlls/comctl32/listview.c
+7
-11
No files found.
dlls/comctl32/listview.c
View file @
69f2e04f
...
...
@@ -4229,13 +4229,9 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn)
||
nColumn
>=
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
))
return
FALSE
;
/* While the MSDN specifically says that column zero should not be deleted,
it does in fact work on WinNT, and at least one app depends on it. On
WinNT, deleting column zero deletes the last column of items but the
first header. Since no app will ever depend on that bizarre behavior,
we just delete the last column including the header.
what actually happens is that the column itself is deleted but no items or subitems
are removed.
*/
if
(
nColumn
==
0
)
nColumn
=
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
-
1
;
LISTVIEW_GetHeaderRect
(
infoPtr
,
nColumn
,
&
rcCol
);
...
...
@@ -4245,15 +4241,12 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn)
Free
(
DPA_GetPtr
(
infoPtr
->
hdpaColumns
,
nColumn
));
DPA_DeletePtr
(
infoPtr
->
hdpaColumns
,
nColumn
);
if
(
!
(
infoPtr
->
dwStyle
&
LVS_OWNERDATA
))
if
(
!
(
infoPtr
->
dwStyle
&
LVS_OWNERDATA
)
&&
nColumn
)
{
SUBITEM_INFO
*
lpSubItem
,
*
lpDelItem
;
HDPA
hdpaSubItems
;
INT
nItem
,
nSubItem
,
i
;
if
(
nColumn
==
0
)
return
LISTVIEW_DeleteAllItems
(
infoPtr
);
for
(
nItem
=
0
;
nItem
<
infoPtr
->
nItemCount
;
nItem
++
)
{
hdpaSubItems
=
(
HDPA
)
DPA_GetPtr
(
infoPtr
->
hdpaItems
,
nItem
);
...
...
@@ -4290,7 +4283,10 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn)
}
/* update the other column info */
LISTVIEW_ScrollColumns
(
infoPtr
,
nColumn
,
-
(
rcCol
.
right
-
rcCol
.
left
));
if
(
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
==
0
)
LISTVIEW_InvalidateList
(
infoPtr
);
else
LISTVIEW_ScrollColumns
(
infoPtr
,
nColumn
,
-
(
rcCol
.
right
-
rcCol
.
left
));
return
TRUE
;
}
...
...
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