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
f6631265
Commit
f6631265
authored
Aug 16, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Aug 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Listview fails to add a column if mask=0.
parent
b150ea67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
listview.c
dlls/comctl32/listview.c
+10
-1
listview.c
dlls/comctl32/tests/listview.c
+23
-0
No files found.
dlls/comctl32/listview.c
View file @
f6631265
...
@@ -6659,7 +6659,16 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
...
@@ -6659,7 +6659,16 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
ZeroMemory
(
&
hdi
,
sizeof
(
HDITEMW
));
ZeroMemory
(
&
hdi
,
sizeof
(
HDITEMW
));
column_fill_hditem
(
infoPtr
,
&
hdi
,
nColumn
,
lpColumn
,
isW
);
column_fill_hditem
(
infoPtr
,
&
hdi
,
nColumn
,
lpColumn
,
isW
);
/*
* A mask not including LVCF_WIDTH turns into a mask of width, width 10
* (can be seen in SPY) otherwise column never gets added.
*/
if
(
!
(
lpColumn
->
mask
&
LVCF_WIDTH
))
{
hdi
.
mask
|=
HDI_WIDTH
;
hdi
.
cxy
=
10
;
}
/*
/*
* when the iSubItem is available Windows copies it to the header lParam. It seems
* when the iSubItem is available Windows copies it to the header lParam. It seems
* to happen only in LVM_INSERTCOLUMN - not in LVM_SETCOLUMN
* to happen only in LVM_INSERTCOLUMN - not in LVM_SETCOLUMN
...
...
dlls/comctl32/tests/listview.c
View file @
f6631265
...
@@ -676,6 +676,28 @@ static void test_items(void)
...
@@ -676,6 +676,28 @@ static void test_items(void)
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
static
void
test_columns
(
void
)
{
HWND
hwnd
;
LVCOLUMN
column
;
DWORD
rc
;
hwnd
=
CreateWindowEx
(
0
,
"SysListView32"
,
"foo"
,
LVS_REPORT
,
10
,
10
,
100
,
200
,
hwndparent
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"failed to create listview window
\n
"
);
/* Add a column with no mask */
memset
(
&
column
,
0xaa
,
sizeof
(
column
));
column
.
mask
=
0
;
rc
=
ListView_InsertColumn
(
hwnd
,
0
,
&
column
);
ok
(
rc
==
0
,
"Inserting column with no mask failed with %d
\n
"
,
rc
);
/* Check its width */
rc
=
ListView_GetColumnWidth
(
hwnd
,
0
);
ok
(
rc
==
10
,
"Inserting column with no mask failed to set width to 10 with %d
\n
"
,
rc
);
DestroyWindow
(
hwnd
);
}
/* test setting imagelist between WM_NCCREATE and WM_CREATE */
/* test setting imagelist between WM_NCCREATE and WM_CREATE */
static
WNDPROC
listviewWndProc
;
static
WNDPROC
listviewWndProc
;
static
HIMAGELIST
test_create_imagelist
;
static
HIMAGELIST
test_create_imagelist
;
...
@@ -1041,4 +1063,5 @@ START_TEST(listview)
...
@@ -1041,4 +1063,5 @@ START_TEST(listview)
test_color
();
test_color
();
test_item_count
();
test_item_count
();
test_item_position
();
test_item_position
();
test_columns
();
}
}
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