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
1eacb105
Commit
1eacb105
authored
Nov 10, 2010
by
Austin Lund
Committed by
Alexandre Julliard
Nov 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Fix band info tests that depend on system font heights.
parent
e062d4a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
rebar.c
dlls/comctl32/tests/rebar.c
+17
-3
No files found.
dlls/comctl32/tests/rebar.c
View file @
1eacb105
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
static
RECT
height_change_notify_rect
;
static
RECT
height_change_notify_rect
;
static
HWND
hMainWnd
;
static
HWND
hMainWnd
;
static
int
system_font_height
;
#define check_rect(name, val, exp) ok(val.top == exp.top && val.bottom == exp.bottom && \
#define check_rect(name, val, exp) ok(val.top == exp.top && val.bottom == exp.bottom && \
...
@@ -65,6 +66,17 @@ static BOOL is_font_installed(const char *name)
...
@@ -65,6 +66,17 @@ static BOOL is_font_installed(const char *name)
return
ret
;
return
ret
;
}
}
static
void
init_system_font_height
(
void
)
{
HDC
hDC
;
TEXTMETRIC
tm
;
hDC
=
CreateCompatibleDC
(
NULL
);
GetTextMetrics
(
hDC
,
&
tm
);
DeleteDC
(
NULL
);
system_font_height
=
tm
.
tmHeight
;
}
static
HWND
create_rebar_control
(
void
)
static
HWND
create_rebar_control
(
void
)
{
{
HWND
hwnd
;
HWND
hwnd
;
...
@@ -814,13 +826,13 @@ static void test_bandinfo(void)
...
@@ -814,13 +826,13 @@ static void test_bandinfo(void)
rb
.
fMask
=
RBBIM_TEXT
;
rb
.
fMask
=
RBBIM_TEXT
;
rb
.
lpText
=
szABC
;
rb
.
lpText
=
szABC
;
ok
(
SendMessageA
(
hRebar
,
RB_SETBANDINFOA
,
0
,
(
LPARAM
)
&
rb
),
"RB_SETBANDINFO failed
\n
"
);
ok
(
SendMessageA
(
hRebar
,
RB_SETBANDINFOA
,
0
,
(
LPARAM
)
&
rb
),
"RB_SETBANDINFO failed
\n
"
);
expect_band_content
(
hRebar
,
0
,
0
,
0
,
GetSysColor
(
COLOR_3DFACE
),
"ABC"
,
-
1
,
NULL
,
15
,
20
,
0
,
NULL
,
0
,
0xdddddddd
,
0xdddddddd
,
0xdddddddd
,
0
,
0
,
3
5
,
-
1
);
expect_band_content
(
hRebar
,
0
,
0
,
0
,
GetSysColor
(
COLOR_3DFACE
),
"ABC"
,
-
1
,
NULL
,
15
,
20
,
0
,
NULL
,
0
,
0xdddddddd
,
0xdddddddd
,
0xdddddddd
,
0
,
0
,
3
+
2
*
system_font_height
,
-
1
);
rb
.
cbSize
=
REBARBANDINFOA_V6_SIZE
;
rb
.
cbSize
=
REBARBANDINFOA_V6_SIZE
;
rb
.
fMask
=
0
;
rb
.
fMask
=
0
;
ok
(
SendMessageA
(
hRebar
,
RB_INSERTBANDA
,
1
,
(
LPARAM
)
&
rb
),
"RB_INSERTBAND failed
\n
"
);
ok
(
SendMessageA
(
hRebar
,
RB_INSERTBANDA
,
1
,
(
LPARAM
)
&
rb
),
"RB_INSERTBAND failed
\n
"
);
expect_band_content
(
hRebar
,
1
,
0
,
0
,
GetSysColor
(
COLOR_3DFACE
),
""
,
-
1
,
NULL
,
0
,
0
,
0
,
NULL
,
0
,
0xdddddddd
,
0xdddddddd
,
0xdddddddd
,
0
,
0
,
9
,
-
1
);
expect_band_content
(
hRebar
,
1
,
0
,
0
,
GetSysColor
(
COLOR_3DFACE
),
""
,
-
1
,
NULL
,
0
,
0
,
0
,
NULL
,
0
,
0xdddddddd
,
0xdddddddd
,
0xdddddddd
,
0
,
0
,
9
,
-
1
);
expect_band_content
(
hRebar
,
0
,
0
,
0
,
GetSysColor
(
COLOR_3DFACE
),
"ABC"
,
-
1
,
NULL
,
15
,
20
,
0
,
NULL
,
0
,
0xdddddddd
,
0xdddddddd
,
0xdddddddd
,
0
,
0
,
40
,
-
1
);
expect_band_content
(
hRebar
,
0
,
0
,
0
,
GetSysColor
(
COLOR_3DFACE
),
"ABC"
,
-
1
,
NULL
,
15
,
20
,
0
,
NULL
,
0
,
0xdddddddd
,
0xdddddddd
,
0xdddddddd
,
0
,
0
,
8
+
2
*
system_font_height
,
-
1
);
rb
.
fMask
=
RBBIM_HEADERSIZE
;
rb
.
fMask
=
RBBIM_HEADERSIZE
;
rb
.
cxHeader
=
50
;
rb
.
cxHeader
=
50
;
...
@@ -839,7 +851,7 @@ static void test_bandinfo(void)
...
@@ -839,7 +851,7 @@ static void test_bandinfo(void)
rb
.
fStyle
=
RBBS_VARIABLEHEIGHT
;
rb
.
fStyle
=
RBBS_VARIABLEHEIGHT
;
rb
.
lpText
=
szABC
;
rb
.
lpText
=
szABC
;
ok
(
SendMessageA
(
hRebar
,
RB_SETBANDINFOA
,
0
,
(
LPARAM
)
&
rb
),
"RB_SETBANDINFO failed
\n
"
);
ok
(
SendMessageA
(
hRebar
,
RB_SETBANDINFOA
,
0
,
(
LPARAM
)
&
rb
),
"RB_SETBANDINFO failed
\n
"
);
expect_band_content
(
hRebar
,
0
,
RBBS_VARIABLEHEIGHT
,
0
,
GetSysColor
(
COLOR_3DFACE
),
"ABC"
,
-
1
,
NULL
,
15
,
20
,
0
,
NULL
,
0
,
20
,
0x7fffffff
,
0
,
0
,
0
,
40
,
5
);
expect_band_content
(
hRebar
,
0
,
RBBS_VARIABLEHEIGHT
,
0
,
GetSysColor
(
COLOR_3DFACE
),
"ABC"
,
-
1
,
NULL
,
15
,
20
,
0
,
NULL
,
0
,
20
,
0x7fffffff
,
0
,
0
,
0
,
8
+
2
*
system_font_height
,
5
);
DestroyWindow
(
hRebar
);
DestroyWindow
(
hRebar
);
}
}
...
@@ -962,6 +974,8 @@ START_TEST(rebar)
...
@@ -962,6 +974,8 @@ START_TEST(rebar)
INITCOMMONCONTROLSEX
iccex
;
INITCOMMONCONTROLSEX
iccex
;
MSG
msg
;
MSG
msg
;
init_system_font_height
();
/* LoadLibrary is needed. This file has no references to functions in comctl32 */
/* LoadLibrary is needed. This file has no references to functions in comctl32 */
hComctl32
=
LoadLibraryA
(
"comctl32.dll"
);
hComctl32
=
LoadLibraryA
(
"comctl32.dll"
);
pInitCommonControlsEx
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
pInitCommonControlsEx
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
...
...
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