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
0f2f1958
Commit
0f2f1958
authored
Oct 06, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Fix a treeview test failure when theming is on.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8f6a4438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
treeview.c
dlls/comctl32/tests/treeview.c
+19
-4
No files found.
dlls/comctl32/tests/treeview.c
View file @
0f2f1958
...
...
@@ -27,12 +27,17 @@
#include "winuser.h"
#include "winnls.h"
#include "winreg.h"
#include "commctrl.h"
#include "commctrl.h"
#include "uxtheme.h"
#include "vsstyle.h"
#include "wine/test.h"
#include "v6util.h"
#include "msg.h"
static
HTHEME
(
WINAPI
*
pGetWindowTheme
)(
HWND
);
static
BOOL
(
WINAPI
*
pIsThemeBackgroundPartiallyTransparent
)(
HTHEME
,
int
,
int
);
static
BOOL
(
WINAPI
*
pInitCommonControlsEx
)(
const
INITCOMMONCONTROLSEX
*
);
static
const
char
*
TEST_CALLBACK_TEXT
=
"callback_text"
;
...
...
@@ -2121,6 +2126,8 @@ static void test_TVS_SINGLEEXPAND(void)
static
void
test_WM_PAINT
(
void
)
{
BOOL
is_glyph_transparent
;
HTHEME
htheme
;
HWND
hTree
;
COLORREF
clr
;
LONG
ret
;
...
...
@@ -2144,7 +2151,11 @@ static void test_WM_PAINT(void)
ok
(
ret
==
0
,
"got %d
\n
"
,
ret
);
clr
=
GetPixel
(
hdc
,
1
,
1
);
ok
(
clr
==
RGB
(
255
,
0
,
0
)
||
broken
(
clr
==
RGB
(
0
,
0
,
0
))
/* win98 */
,
htheme
=
pGetWindowTheme
(
hTree
);
is_glyph_transparent
=
htheme
&&
pIsThemeBackgroundPartiallyTransparent
(
htheme
,
TVP_GLYPH
,
0
);
ok
(
clr
==
RGB
(
255
,
0
,
0
)
||
broken
(
clr
==
RGB
(
0
,
0
,
0
))
/* win98 */
/* When theming is on and treeview glyphs are transparent, parent window needs to be repainted */
||
(
is_glyph_transparent
&&
clr
==
GetSysColor
(
COLOR_WINDOW
)),
"got 0x%x
\n
"
,
clr
);
ReleaseDC
(
hMainWnd
,
hdc
);
...
...
@@ -2945,9 +2956,13 @@ static void test_right_click(void)
static
void
init_functions
(
void
)
{
HMODULE
hComCtl32
=
LoadLibraryA
(
"comctl32.dll"
);
HMODULE
hUxtheme
=
LoadLibraryA
(
"uxtheme.dll"
);
#define X(module, f) p##f = (void*)GetProcAddress(module, #f);
X
(
hComCtl32
,
InitCommonControlsEx
);
#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f
);
X
(
InitCommonControlsEx
);
X
(
hUxtheme
,
GetWindowTheme
);
X
(
hUxtheme
,
IsThemeBackgroundPartiallyTransparent
);
#undef X
}
...
...
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