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
5e53ddfc
Commit
5e53ddfc
authored
Jun 01, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Some tests for LVM_EDITLABEL.
parent
551bb478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
listview.c
dlls/comctl32/tests/listview.c
+57
-0
No files found.
dlls/comctl32/tests/listview.c
View file @
5e53ddfc
...
...
@@ -230,6 +230,10 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
}
add_message
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
&
msg
);
/* always accept new item text */
if
(
message
==
WM_NOTIFY
&&
lParam
&&
((
NMHDR
*
)
lParam
)
->
code
==
LVN_ENDLABELEDIT
)
return
TRUE
;
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
--
;
...
...
@@ -2830,6 +2834,58 @@ static void test_getitemrect(void)
DestroyWindow
(
hwnd
);
}
static
void
test_editbox
(
void
)
{
HWND
hwnd
,
hwndedit
;
LVITEMA
item
;
DWORD
r
;
static
CHAR
testitemA
[]
=
"testitem"
;
static
CHAR
testitem1A
[]
=
"testitem1"
;
static
CHAR
buffer
[
10
];
hwnd
=
create_listview_control
(
LVS_EDITLABELS
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
insert_column
(
hwnd
,
0
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
mask
=
LVIF_TEXT
;
item
.
pszText
=
testitemA
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
0
,
r
);
/* setting focus is necessary */
SetFocus
(
hwnd
);
hwndedit
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
ok
(
IsWindow
(
hwndedit
),
"Expected Edit window to be created
\n
"
);
/* modify initial string */
r
=
SendMessage
(
hwndedit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
testitem1A
);
expect
(
TRUE
,
r
);
/* return focus to listview */
SetFocus
(
hwnd
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
mask
=
LVIF_TEXT
;
item
.
pszText
=
buffer
;
item
.
cchTextMax
=
10
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
r
);
ok
(
strcmp
(
buffer
,
testitem1A
)
==
0
,
"Expected item text to change
\n
"
);
/* creating label disabled when control isn't focused */
SetFocus
(
0
);
hwndedit
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
todo_wine
ok
(
hwndedit
==
NULL
,
"Expected Edit window not to be created
\n
"
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -2878,6 +2934,7 @@ START_TEST(listview)
test_getviewrect
();
test_getitemposition
();
test_columnscreation
();
test_editbox
();
DestroyWindow
(
hwndparent
);
}
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