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
444b781f
Commit
444b781f
authored
Apr 06, 2011
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a test for activating a menu consisting from a single menu item using a hot key.
parent
dfbf47b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
msg.c
dlls/user32/tests/msg.c
+42
-0
resource.rc
dlls/user32/tests/resource.rc
+1
-0
No files found.
dlls/user32/tests/msg.c
View file @
444b781f
...
...
@@ -11965,6 +11965,33 @@ static const struct message wm_popup_menu_3[] =
{
0
}
};
static
const
struct
message
wm_single_menu_item
[]
=
{
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
VK_MENU
,
0x20000001
},
{
WM_SYSKEYDOWN
,
sent
|
wparam
|
lparam
,
VK_MENU
,
0x20000001
},
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
'Q'
,
0x20000001
},
{
WM_SYSKEYDOWN
,
sent
|
wparam
|
lparam
,
'Q'
,
0x20000001
},
{
WM_SYSCHAR
,
sent
|
wparam
|
lparam
,
'q'
,
0x20000001
},
{
HCBT_SYSCOMMAND
,
hook
|
wparam
|
lparam
,
SC_KEYMENU
,
'q'
},
{
WM_ENTERMENULOOP
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_INITMENU
,
sent
|
lparam
,
0
,
0
},
{
WM_MENUSELECT
,
sent
|
wparam
|
optional
,
MAKEWPARAM
(
300
,
MF_HILITE
)
},
{
WM_MENUSELECT
,
sent
|
wparam
|
lparam
,
MAKEWPARAM
(
0
,
0xffff
),
0
},
{
WM_EXITMENULOOP
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_MENUCOMMAND
,
sent
},
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
'Q'
,
0xe0000001
},
{
WM_SYSKEYUP
,
sent
|
wparam
|
lparam
,
'Q'
,
0xe0000001
},
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
VK_MENU
,
0xc0000001
},
{
WM_KEYUP
,
sent
|
wparam
|
lparam
,
VK_MENU
,
0xc0000001
},
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
VK_ESCAPE
,
1
},
{
WM_KEYDOWN
,
sent
|
wparam
|
lparam
,
VK_ESCAPE
,
1
},
{
WM_CHAR
,
sent
|
wparam
|
lparam
,
VK_ESCAPE
,
0x00000001
},
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
VK_ESCAPE
,
0xc0000001
},
{
WM_KEYUP
,
sent
|
wparam
|
lparam
,
VK_ESCAPE
,
0xc0000001
},
{
0
}
};
static
LRESULT
WINAPI
parent_menu_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wp
,
LPARAM
lp
)
{
if
(
message
==
WM_ENTERIDLE
||
...
...
@@ -12123,6 +12150,21 @@ static void test_menu_messages(void)
}
ok_sequence
(
wm_popup_menu_2
,
"submenu of a popup menu command"
,
FALSE
);
trace
(
"testing single menu item command
\n
"
);
flush_sequence
();
keybd_event
(
VK_MENU
,
0
,
0
,
0
);
keybd_event
(
'Q'
,
0
,
0
,
0
);
keybd_event
(
'Q'
,
0
,
KEYEVENTF_KEYUP
,
0
);
keybd_event
(
VK_MENU
,
0
,
KEYEVENTF_KEYUP
,
0
);
keybd_event
(
VK_ESCAPE
,
0
,
0
,
0
);
keybd_event
(
VK_ESCAPE
,
0
,
KEYEVENTF_KEYUP
,
0
);
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
ok_sequence
(
wm_single_menu_item
,
"single menu item command"
,
TRUE
);
set_menu_style
(
hmenu
,
0
);
style
=
get_menu_style
(
hmenu
);
ok
(
style
==
0
,
"expected 0, got %u
\n
"
,
style
);
...
...
dlls/user32/tests/resource.rc
View file @
444b781f
...
...
@@ -190,4 +190,5 @@ FONT 8, "MS Shell Dlg"
MENUITEM "&Paste", 203
MENUITEM "&Delete", 204
}
MENUITEM "&Quit", 300
}
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