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
43d982fd
Commit
43d982fd
authored
Jun 01, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Block LVM_EDITLABEL when control is unfocused and no label created.
parent
28d0487c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
listview.c
dlls/comctl32/listview.c
+2
-0
listview.c
dlls/comctl32/tests/listview.c
+11
-2
No files found.
dlls/comctl32/listview.c
View file @
43d982fd
...
...
@@ -5010,6 +5010,8 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW)
if
(
~
infoPtr
->
dwStyle
&
LVS_EDITLABELS
)
return
0
;
if
(
nItem
<
0
||
nItem
>=
infoPtr
->
nItemCount
)
return
0
;
/* Edit could be created only on focused control and if isn't already created */
if
(
GetFocus
()
!=
infoPtr
->
hwndSelf
&&
!
IsWindow
(
infoPtr
->
hwndEdit
))
return
0
;
infoPtr
->
nEditLabelItem
=
nItem
;
...
...
dlls/comctl32/tests/listview.c
View file @
43d982fd
...
...
@@ -2836,7 +2836,7 @@ static void test_getitemrect(void)
static
void
test_editbox
(
void
)
{
HWND
hwnd
,
hwndedit
;
HWND
hwnd
,
hwndedit
,
hwndedit2
;
LVITEMA
item
;
DWORD
r
;
static
CHAR
testitemA
[]
=
"testitem"
;
...
...
@@ -2878,10 +2878,19 @@ static void test_editbox(void)
ok
(
strcmp
(
buffer
,
testitem1A
)
==
0
,
"Expected item text to change
\n
"
);
/* send LVM_EDITLABEL on already created edit */
SetFocus
(
hwnd
);
hwndedit
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
ok
(
IsWindow
(
hwndedit
),
"Expected Edit window to be created
\n
"
);
/* focus will be set to edit */
ok
(
GetFocus
()
==
hwndedit
,
"Expected Edit window to be focused
\n
"
);
hwndedit2
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
ok
(
IsWindow
(
hwndedit2
),
"Expected Edit window to be created
\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
"
);
ok
(
hwndedit
==
NULL
,
"Expected Edit window not to be created
\n
"
);
DestroyWindow
(
hwnd
);
}
...
...
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