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
9618aae3
Commit
9618aae3
authored
Jul 22, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tooltips: Fix TTM_GETMARGIN/TTM_SETMARGIN handling.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
887db340
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
10 deletions
+44
-10
tooltips.c
dlls/comctl32/tests/tooltips.c
+38
-0
tooltips.c
dlls/comctl32/tooltips.c
+6
-10
No files found.
dlls/comctl32/tests/tooltips.c
View file @
9618aae3
...
@@ -1010,6 +1010,43 @@ static void test_setinfo(void)
...
@@ -1010,6 +1010,43 @@ static void test_setinfo(void)
DestroyWindow
(
parent2
);
DestroyWindow
(
parent2
);
}
}
static
void
test_margin
(
void
)
{
RECT
r
,
r1
;
HWND
hwnd
;
DWORD
ret
;
hwnd
=
CreateWindowExA
(
0
,
TOOLTIPS_CLASSA
,
NULL
,
0
,
10
,
10
,
300
,
100
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
hwnd
!=
NULL
,
"failed to create tooltip wnd
\n
"
);
ret
=
SendMessageA
(
hwnd
,
TTM_SETMARGIN
,
0
,
0
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
SetRect
(
&
r
,
-
1
,
-
1
,
1
,
1
);
ret
=
SendMessageA
(
hwnd
,
TTM_SETMARGIN
,
0
,
(
LPARAM
)
&
r
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
SetRect
(
&
r1
,
0
,
0
,
0
,
0
);
ret
=
SendMessageA
(
hwnd
,
TTM_GETMARGIN
,
0
,
(
LPARAM
)
&
r1
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
EqualRect
(
&
r
,
&
r1
),
"got %s, was %s
\n
"
,
wine_dbgstr_rect
(
&
r1
),
wine_dbgstr_rect
(
&
r
));
ret
=
SendMessageA
(
hwnd
,
TTM_SETMARGIN
,
0
,
0
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
SetRect
(
&
r1
,
0
,
0
,
0
,
0
);
ret
=
SendMessageA
(
hwnd
,
TTM_GETMARGIN
,
0
,
(
LPARAM
)
&
r1
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
EqualRect
(
&
r
,
&
r1
),
"got %s, was %s
\n
"
,
wine_dbgstr_rect
(
&
r1
),
wine_dbgstr_rect
(
&
r
));
ret
=
SendMessageA
(
hwnd
,
TTM_GETMARGIN
,
0
,
0
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
tooltips
)
START_TEST
(
tooltips
)
{
{
InitCommonControls
();
InitCommonControls
();
...
@@ -1022,4 +1059,5 @@ START_TEST(tooltips)
...
@@ -1022,4 +1059,5 @@ START_TEST(tooltips)
test_longtextW
();
test_longtextW
();
test_track
();
test_track
();
test_setinfo
();
test_setinfo
();
test_margin
();
}
}
dlls/comctl32/tooltips.c
View file @
9618aae3
...
@@ -1323,12 +1323,10 @@ TOOLTIPS_GetDelayTime (const TOOLTIPS_INFO *infoPtr, DWORD duration)
...
@@ -1323,12 +1323,10 @@ TOOLTIPS_GetDelayTime (const TOOLTIPS_INFO *infoPtr, DWORD duration)
static
LRESULT
static
LRESULT
TOOLTIPS_GetMargin
(
const
TOOLTIPS_INFO
*
infoPtr
,
LPRECT
lpR
ect
)
TOOLTIPS_GetMargin
(
const
TOOLTIPS_INFO
*
infoPtr
,
RECT
*
r
ect
)
{
{
lpRect
->
left
=
infoPtr
->
rcMargin
.
left
;
if
(
rect
)
lpRect
->
right
=
infoPtr
->
rcMargin
.
right
;
*
rect
=
infoPtr
->
rcMargin
;
lpRect
->
bottom
=
infoPtr
->
rcMargin
.
bottom
;
lpRect
->
top
=
infoPtr
->
rcMargin
.
top
;
return
0
;
return
0
;
}
}
...
@@ -1600,12 +1598,10 @@ TOOLTIPS_SetDelayTime (TOOLTIPS_INFO *infoPtr, DWORD duration, INT nTime)
...
@@ -1600,12 +1598,10 @@ TOOLTIPS_SetDelayTime (TOOLTIPS_INFO *infoPtr, DWORD duration, INT nTime)
static
LRESULT
static
LRESULT
TOOLTIPS_SetMargin
(
TOOLTIPS_INFO
*
infoPtr
,
const
RECT
*
lpR
ect
)
TOOLTIPS_SetMargin
(
TOOLTIPS_INFO
*
infoPtr
,
const
RECT
*
r
ect
)
{
{
infoPtr
->
rcMargin
.
left
=
lpRect
->
left
;
if
(
rect
)
infoPtr
->
rcMargin
.
right
=
lpRect
->
right
;
infoPtr
->
rcMargin
=
*
rect
;
infoPtr
->
rcMargin
.
bottom
=
lpRect
->
bottom
;
infoPtr
->
rcMargin
.
top
=
lpRect
->
top
;
return
0
;
return
0
;
}
}
...
...
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