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
14f7fd4e
Commit
14f7fd4e
authored
Jan 16, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Jan 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add tests for setting and getting the background brush.
parent
a940718a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
menu.c
dlls/user32/tests/menu.c
+26
-0
No files found.
dlls/user32/tests/menu.c
View file @
14f7fd4e
...
...
@@ -2976,6 +2976,7 @@ static void test_menu_setmenuinfo(void)
MENUITEMINFOA
mii
=
{
sizeof
(
MENUITEMINFOA
)
};
BOOL
ret
;
DWORD
gle
;
HBRUSH
brush
;
if
(
!
pGetMenuInfo
||
!
pSetMenuInfo
)
{
...
...
@@ -3091,6 +3092,31 @@ static void test_menu_setmenuinfo(void)
ok
(
ret
,
"GetMenuInfo() should have succeeded
\n
"
);
ok
(
gle
==
0xdeadbeef
,
"GetMenuInfo() error got %u
\n
"
,
gle
);
ok
(
!
(
mi
.
dwStyle
&
MNS_NOCHECK
),
"menustyle was not expected to have the MNS_NOCHECK flag
\n
"
);
/* test background brush */
mi
.
cbSize
=
sizeof
(
mi
);
mi
.
fMask
=
MIM_BACKGROUND
;
ret
=
pGetMenuInfo
(
hmenu
,
&
mi
);
ok
(
ret
,
"GetMenuInfo() should have succeeded
\n
"
);
ok
(
mi
.
hbrBack
==
NULL
,
"got %p
\n
"
,
mi
.
hbrBack
);
brush
=
CreateSolidBrush
(
RGB
(
0xff
,
0
,
0
)
);
mi
.
hbrBack
=
brush
;
ret
=
pSetMenuInfo
(
hmenu
,
&
mi
);
ok
(
ret
,
"SetMenuInfo() should have succeeded
\n
"
);
mi
.
hbrBack
=
NULL
;
ret
=
pGetMenuInfo
(
hmenu
,
&
mi
);
ok
(
ret
,
"GetMenuInfo() should have succeeded
\n
"
);
ok
(
mi
.
hbrBack
==
brush
,
"got %p original %p
\n
"
,
mi
.
hbrBack
,
brush
);
mi
.
hbrBack
=
NULL
;
ret
=
pSetMenuInfo
(
hmenu
,
&
mi
);
ok
(
ret
,
"SetMenuInfo() should have succeeded
\n
"
);
ret
=
pGetMenuInfo
(
hmenu
,
&
mi
);
ok
(
ret
,
"GetMenuInfo() should have succeeded
\n
"
);
ok
(
mi
.
hbrBack
==
NULL
,
"got %p
\n
"
,
mi
.
hbrBack
);
DeleteObject
(
brush
);
/* clean up */
DestroyMenu
(
hsubmenu
);
DestroyMenu
(
hmenu
);
...
...
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