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
57dec767
Commit
57dec767
authored
Dec 01, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/syslink: Fix return value for LM_GETIDEALSIZE.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8138ac9a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
5 deletions
+44
-5
syslink.c
dlls/comctl32/syslink.c
+5
-5
syslink.c
dlls/comctl32/tests/syslink.c
+39
-0
No files found.
dlls/comctl32/syslink.c
View file @
57dec767
...
...
@@ -1472,7 +1472,7 @@ static BOOL SYSLINK_NoNextLink (const SYSLINK_INFO *infoPtr, BOOL Prev)
* SYSLINK_GetIdealSize
* Calculates the ideal size of a link control at a given maximum width.
*/
static
VOID
SYSLINK_GetIdealSize
(
const
SYSLINK_INFO
*
infoPtr
,
int
cxMaxWidth
,
LPSIZE
lpSize
)
static
LONG
SYSLINK_GetIdealSize
(
const
SYSLINK_INFO
*
infoPtr
,
int
cxMaxWidth
,
SIZE
*
lpSize
)
{
RECT
rc
;
HDC
hdc
;
...
...
@@ -1493,6 +1493,8 @@ static VOID SYSLINK_GetIdealSize (const SYSLINK_INFO *infoPtr, int cxMaxWidth, L
lpSize
->
cx
=
rc
.
right
;
lpSize
->
cy
=
rc
.
bottom
;
}
return
rc
.
bottom
;
}
/***********************************************************************
...
...
@@ -1664,10 +1666,8 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case
LM_GETIDEALHEIGHT
:
if
(
lParam
)
{
/* LM_GETIDEALSIZE */
SYSLINK_GetIdealSize
(
infoPtr
,
(
int
)
wParam
,
(
LPSIZE
)
lParam
);
}
return
SYSLINK_GetIdealSize
(
infoPtr
,
(
int
)
wParam
,
(
SIZE
*
)
lParam
);
else
return
SYSLINK_GetIdealHeight
(
infoPtr
);
case
WM_SETFOCUS
:
...
...
dlls/comctl32/tests/syslink.c
View file @
57dec767
...
...
@@ -205,6 +205,43 @@ static void test_create_syslink(void)
DestroyWindow
(
hWndSysLink
);
}
static
void
test_LM_GETIDEALHEIGHT
(
void
)
{
HWND
hwnd
;
LONG
ret
;
hwnd
=
create_syslink
(
WS_CHILD
|
WS_TABSTOP
|
WS_VISIBLE
,
hWndParent
);
ok
(
hwnd
!=
NULL
,
"Failed to create SysLink window.
\n
"
);
ret
=
SendMessageA
(
hwnd
,
LM_GETIDEALHEIGHT
,
0
,
0
);
ok
(
ret
>
0
,
"Unexpected ideal height, %d.
\n
"
,
ret
);
DestroyWindow
(
hwnd
);
}
static
void
test_LM_GETIDEALSIZE
(
void
)
{
HWND
hwnd
;
LONG
ret
;
SIZE
sz
;
hwnd
=
create_syslink
(
WS_CHILD
|
WS_TABSTOP
|
WS_VISIBLE
,
hWndParent
);
ok
(
hwnd
!=
NULL
,
"Failed to create SysLink window.
\n
"
);
memset
(
&
sz
,
0
,
sizeof
(
sz
));
ret
=
SendMessageA
(
hwnd
,
LM_GETIDEALSIZE
,
0
,
(
LPARAM
)
&
sz
);
ok
(
ret
>
0
,
"Unexpected return value, %d.
\n
"
,
ret
);
if
(
sz
.
cy
==
0
)
win_skip
(
"LM_GETIDEALSIZE is not supported.
\n
"
);
else
{
ok
(
sz
.
cx
>
5
,
"Unexpected ideal width, %d.
\n
"
,
sz
.
cx
);
ok
(
sz
.
cy
==
ret
,
"Unexpected ideal height, %d.
\n
"
,
sz
.
cy
);
}
DestroyWindow
(
hwnd
);
}
START_TEST
(
syslink
)
{
ULONG_PTR
ctx_cookie
;
...
...
@@ -231,6 +268,8 @@ START_TEST(syslink)
flush_events
();
test_create_syslink
();
test_LM_GETIDEALHEIGHT
();
test_LM_GETIDEALSIZE
();
DestroyWindow
(
hWndParent
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
...
...
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