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
970029bb
Commit
970029bb
authored
Jan 25, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/toolbar: Fix TB_SETDRAWTEXTFLAGS handler.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
03d22add
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
7 deletions
+48
-7
toolbar.c
dlls/comctl32/tests/toolbar.c
+42
-0
toolbar.c
dlls/comctl32/toolbar.c
+6
-7
No files found.
dlls/comctl32/tests/toolbar.c
View file @
970029bb
...
...
@@ -2367,6 +2367,47 @@ static void test_save(void)
RegCloseKey
(
key
);
}
static
void
test_drawtext_flags
(
void
)
{
HWND
hwnd
=
NULL
;
UINT
flags
;
rebuild_toolbar
(
&
hwnd
);
flags
=
SendMessageA
(
hwnd
,
TB_SETDRAWTEXTFLAGS
,
0
,
0
);
todo_wine
ok
(
flags
==
0
,
"Unexpected draw text flags %#x
\n
"
,
flags
);
/* zero mask, flags are retained */
flags
=
SendMessageA
(
hwnd
,
TB_SETDRAWTEXTFLAGS
,
0
,
DT_BOTTOM
);
todo_wine
ok
(
flags
==
0
,
"Unexpected draw text flags %#x
\n
"
,
flags
);
ok
(
!
(
flags
&
DT_BOTTOM
),
"Unexpected DT_BOTTOM style
\n
"
);
flags
=
SendMessageA
(
hwnd
,
TB_SETDRAWTEXTFLAGS
,
0
,
0
);
todo_wine
ok
(
flags
==
0
,
"Unexpected draw text flags %#x
\n
"
,
flags
);
ok
(
!
(
flags
&
DT_BOTTOM
),
"Unexpected DT_BOTTOM style
\n
"
);
/* set/remove */
flags
=
SendMessageA
(
hwnd
,
TB_SETDRAWTEXTFLAGS
,
DT_BOTTOM
,
DT_BOTTOM
);
todo_wine
ok
(
flags
==
0
,
"Unexpected draw text flags %#x
\n
"
,
flags
);
ok
(
!
(
flags
&
DT_BOTTOM
),
"Unexpected DT_BOTTOM style
\n
"
);
flags
=
SendMessageA
(
hwnd
,
TB_SETDRAWTEXTFLAGS
,
DT_BOTTOM
,
0
);
todo_wine
ok
(
flags
==
DT_BOTTOM
,
"Unexpected draw text flags %#x
\n
"
,
flags
);
ok
(
flags
&
DT_BOTTOM
,
"Expected DT_BOTTOM style, %#x
\n
"
,
flags
);
flags
=
SendMessageA
(
hwnd
,
TB_SETDRAWTEXTFLAGS
,
DT_BOTTOM
,
0
);
todo_wine
ok
(
flags
==
0
,
"Unexpected draw text flags %#x
\n
"
,
flags
);
ok
(
!
(
flags
&
DT_BOTTOM
),
"Unexpected DT_BOTTOM style
\n
"
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
toolbar
)
{
WNDCLASSA
wc
;
...
...
@@ -2411,6 +2452,7 @@ START_TEST(toolbar)
test_TB_GET_SET_EXTENDEDSTYLE
();
test_noresize
();
test_save
();
test_drawtext_flags
();
PostQuitMessage
(
0
);
while
(
GetMessageA
(
&
msg
,
0
,
0
,
0
))
{
...
...
dlls/comctl32/toolbar.c
View file @
970029bb
...
...
@@ -4546,17 +4546,16 @@ TOOLBAR_SetDisabledImageList (TOOLBAR_INFO *infoPtr, WPARAM wParam, HIMAGELIST h
static
LRESULT
TOOLBAR_SetDrawTextFlags
(
TOOLBAR_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
TOOLBAR_SetDrawTextFlags
(
TOOLBAR_INFO
*
infoPtr
,
DWORD
mask
,
DWORD
flags
)
{
DWORD
dwTemp
;
DWORD
old_flags
;
TRACE
(
"hwnd = %p,
dwMask = 0x%08x, dwDTFlags = 0x%08x
\n
"
,
infoPtr
->
hwndSelf
,
(
DWORD
)
wParam
,
(
DWORD
)
lParam
);
TRACE
(
"hwnd = %p,
mask = 0x%08x, flags = 0x%08x
\n
"
,
infoPtr
->
hwndSelf
,
mask
,
flags
);
dwTemp
=
infoPtr
->
dwDTFlags
;
infoPtr
->
dwDTFlags
=
(
infoPtr
->
dwDTFlags
&
(
DWORD
)
wParam
)
|
(
DWORD
)
lParam
;
old_flags
=
infoPtr
->
dwDTFlags
;
infoPtr
->
dwDTFlags
=
(
old_flags
&
~
mask
)
|
(
flags
&
mask
);
return
(
LRESULT
)
dwTemp
;
return
(
LRESULT
)
old_flags
;
}
/* This function differs a bit from what MSDN says it does:
...
...
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