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
379cf468
Commit
379cf468
authored
Apr 23, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Don't change Z-order of edit window while resizing edit box.
parent
0af447ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
listview.c
dlls/comctl32/listview.c
+4
-10
listview.c
dlls/comctl32/tests/listview.c
+19
-7
No files found.
dlls/comctl32/listview.c
View file @
379cf468
...
...
@@ -11599,7 +11599,7 @@ static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lP
/* Select font to get the right dimension of the string */
hFont
=
(
HFONT
)
SendMessageW
(
infoPtr
->
hwndEdit
,
WM_GETFONT
,
0
,
0
);
if
(
hFont
!=
0
)
if
(
hFont
)
{
hOldFont
=
SelectObject
(
hdc
,
hFont
);
}
...
...
@@ -11612,16 +11612,10 @@ static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lP
GetTextMetricsW
(
hdc
,
&
textMetric
);
sz
.
cx
+=
(
textMetric
.
tmMaxCharWidth
*
2
);
SetWindowPos
(
infoPtr
->
hwndEdit
,
HWND_TOP
,
0
,
0
,
sz
.
cx
,
rect
.
bottom
-
rect
.
top
,
SWP_DRAWFRAME
|
SWP_NOMOVE
);
SetWindowPos
(
infoPtr
->
hwndEdit
,
NULL
,
0
,
0
,
sz
.
cx
,
rect
.
bottom
-
rect
.
top
,
SWP_DRAWFRAME
|
SWP_NOMOVE
|
SWP_NOZORDER
);
}
if
(
hFont
!=
0
)
if
(
hFont
)
SelectObject
(
hdc
,
hOldFont
);
ReleaseDC
(
infoPtr
->
hwndEdit
,
hdc
);
...
...
dlls/comctl32/tests/listview.c
View file @
379cf468
...
...
@@ -3422,12 +3422,12 @@ static void test_getitemrect(void)
static
void
test_editbox
(
void
)
{
HWND
hwnd
,
hwndedit
,
hwndedit2
;
static
CHAR
testitemA
[]
=
"testitem"
;
static
CHAR
testitem1A
[]
=
"testitem_quitelongname"
;
static
CHAR
buffer
[
25
];
HWND
hwnd
,
hwndedit
,
hwndedit2
,
header
;
LVITEMA
item
;
DWORD
r
;
static
CHAR
testitemA
[]
=
"testitem"
;
static
CHAR
testitem1A
[]
=
"testitem1"
;
static
CHAR
buffer
[
10
];
hwnd
=
create_listview_control
(
LVS_EDITLABELS
|
LVS_REPORT
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
...
...
@@ -3447,16 +3447,28 @@ static void test_editbox(void)
hwndedit
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
ok
(
IsWindow
(
hwndedit
),
"Expected Edit window to be created
\n
"
);
/* test children Z-order after Edit box created */
header
=
(
HWND
)
SendMessageA
(
hwnd
,
LVM_GETHEADER
,
0
,
0
);
ok
(
IsWindow
(
header
),
"Expected header to be created
\n
"
);
ok
(
GetTopWindow
(
hwnd
)
==
header
,
"Expected header to be on top
\n
"
);
ok
(
GetNextWindow
(
header
,
GW_HWNDNEXT
)
==
hwndedit
,
"got %p
\n
"
,
GetNextWindow
(
header
,
GW_HWNDNEXT
));
/* modify initial string */
r
=
SendMessage
(
hwndedit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
testitem1A
);
expect
(
TRUE
,
r
);
/* edit window is resized and repositioned,
check again for Z-order - it should be preserved */
ok
(
GetTopWindow
(
hwnd
)
==
header
,
"Expected header to be on top
\n
"
);
ok
(
GetNextWindow
(
header
,
GW_HWNDNEXT
)
==
hwndedit
,
"got %p
\n
"
,
GetNextWindow
(
header
,
GW_HWNDNEXT
));
/* return focus to listview */
SetFocus
(
hwnd
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
mask
=
LVIF_TEXT
;
item
.
pszText
=
buffer
;
item
.
cchTextMax
=
10
;
item
.
cchTextMax
=
sizeof
(
buffer
)
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
...
...
@@ -3496,7 +3508,7 @@ static void test_editbox(void)
expect
(
0
,
r
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
pszText
=
buffer
;
item
.
cchTextMax
=
10
;
item
.
cchTextMax
=
sizeof
(
buffer
)
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMTEXTA
,
0
,
(
LPARAM
)
&
item
);
...
...
@@ -3522,7 +3534,7 @@ static void test_editbox(void)
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
pszText
=
buffer
;
item
.
cchTextMax
=
10
;
item
.
cchTextMax
=
sizeof
(
buffer
)
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_GETITEMTEXTA
,
0
,
(
LPARAM
)
&
item
);
...
...
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