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
5f327bbb
Commit
5f327bbb
authored
Dec 18, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Remove runtime check for GetMenuBarInfo().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21149e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
+7
-23
edit.c
dlls/user32/tests/edit.c
+7
-23
No files found.
dlls/user32/tests/edit.c
View file @
5f327bbb
...
...
@@ -38,15 +38,6 @@ struct edit_notify {
static
struct
edit_notify
notifications
;
static
BOOL
(
WINAPI
*
pGetMenuBarInfo
)(
HWND
,
LONG
,
LONG
,
PMENUBARINFO
);
static
void
init_function_pointers
(
void
)
{
HMODULE
hdll
=
GetModuleHandleA
(
"user32"
);
pGetMenuBarInfo
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetMenuBarInfo"
);
}
static
INT_PTR
CALLBACK
multi_edit_dialog_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
static
int
num_ok_commands
=
0
;
...
...
@@ -2310,9 +2301,8 @@ static LRESULT CALLBACK edit_proc_proxy(HWND hWnd, UINT msg, WPARAM wParam, LPAR
memset
(
&
mbi
,
0
,
sizeof
(
mbi
));
mbi
.
cbSize
=
sizeof
(
mbi
);
SetLastError
(
0xdeadbeef
);
ret
=
pGetMenuBarInfo
(
ctx_menu
,
OBJID_CLIENT
,
0
,
&
mbi
);
ok
(
ret
||
broken
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
)
/* NT */
,
"GetMenuBarInfo failed
\n
"
);
ret
=
GetMenuBarInfo
(
ctx_menu
,
OBJID_CLIENT
,
0
,
&
mbi
);
ok
(
ret
,
"GetMenuBarInfo failed
\n
"
);
if
(
ret
)
{
ok
(
mbi
.
hMenu
!=
NULL
,
"mbi.hMenu = NULL
\n
"
);
...
...
@@ -2324,9 +2314,8 @@ static LRESULT CALLBACK edit_proc_proxy(HWND hWnd, UINT msg, WPARAM wParam, LPAR
memset
(
&
mbi
,
0
,
sizeof
(
mbi
));
mbi
.
cbSize
=
sizeof
(
mbi
);
SetLastError
(
0xdeadbeef
);
ret
=
pGetMenuBarInfo
(
ctx_menu
,
OBJID_CLIENT
,
1
,
&
mbi
);
ok
(
ret
||
broken
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
)
/* NT */
,
"GetMenuBarInfo failed
\n
"
);
ret
=
GetMenuBarInfo
(
ctx_menu
,
OBJID_CLIENT
,
1
,
&
mbi
);
ok
(
ret
,
"GetMenuBarInfo failed
\n
"
);
if
(
ret
)
{
ok
(
mbi
.
hMenu
!=
NULL
,
"mbi.hMenu = NULL
\n
"
);
...
...
@@ -2356,7 +2345,7 @@ static LRESULT CALLBACK child_edit_menu_proc(HWND hwnd, UINT msg, WPARAM wParam,
if
(
wParam
==
MSGF_MENU
)
{
HWND
hwndMenu
=
(
HWND
)
lParam
;
MENUBARINFO
mbi
=
{
sizeof
(
MENUBARINFO
)
};
if
(
p
GetMenuBarInfo
(
hwndMenu
,
OBJID_CLIENT
,
0
,
&
mbi
))
{
if
(
GetMenuBarInfo
(
hwndMenu
,
OBJID_CLIENT
,
0
,
&
mbi
))
{
MENUITEMINFOA
mii
=
{
sizeof
(
MENUITEMINFOA
),
MIIM_STATE
};
if
(
GetMenuItemInfoA
(
mbi
.
hMenu
,
EM_SETSEL
,
FALSE
,
&
mii
))
{
if
(
mii
.
fState
&
MFS_HILITE
)
{
...
...
@@ -2402,11 +2391,8 @@ static void test_contextmenu(void)
ok
(
got_en_setfocus
,
"edit box didn't get focused
\n
"
);
ok
(
got_wm_capturechanged
,
"main window capture did not change
\n
"
);
if
(
pGetMenuBarInfo
)
{
p_edit_proc
=
(
void
*
)
SetWindowLongPtrA
(
hwndEdit
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
edit_proc_proxy
);
SendMessageA
(
hwndEdit
,
WM_CONTEXTMENU
,
(
WPARAM
)
hwndEdit
,
MAKEWORD
(
10
,
10
));
}
p_edit_proc
=
(
void
*
)
SetWindowLongPtrA
(
hwndEdit
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
edit_proc_proxy
);
SendMessageA
(
hwndEdit
,
WM_CONTEXTMENU
,
(
WPARAM
)
hwndEdit
,
MAKEWORD
(
10
,
10
));
DestroyWindow
(
hwndEdit
);
...
...
@@ -2954,8 +2940,6 @@ START_TEST(edit)
{
BOOL
b
;
init_function_pointers
();
hinst
=
GetModuleHandleA
(
NULL
);
b
=
RegisterWindowClasses
();
ok
(
b
,
"RegisterWindowClasses failed
\n
"
);
...
...
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