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
33026a2a
Commit
33026a2a
authored
Feb 26, 2000
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Feb 26, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send WM_HELP message when F1 is pressed.
parent
f94c3c55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
menu.c
controls/menu.c
+26
-0
menu.h
include/menu.h
+1
-0
message.c
windows/message.c
+23
-0
No files found.
controls/menu.c
View file @
33026a2a
...
...
@@ -2140,6 +2140,16 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
return
item
->
hSubMenu
;
}
/**********************************************************************
* MENU_IsMenuActive
*/
BOOL
MENU_IsMenuActive
(
void
)
{
return
pTopPopupWnd
&&
(
pTopPopupWnd
->
dwStyle
&
WS_VISIBLE
);
}
/***********************************************************************
* MENU_PtMenu
*
...
...
@@ -2768,6 +2778,22 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
fEndMenu
=
TRUE
;
break
;
case
VK_F1
:
{
HELPINFO
hi
;
hi
.
cbSize
=
sizeof
(
HELPINFO
);
hi
.
iContextType
=
HELPINFO_MENUITEM
;
if
(
menu
->
FocusedItem
==
NO_SELECTED_ITEM
)
hi
.
iCtrlId
=
0
;
else
hi
.
iCtrlId
=
menu
->
items
[
menu
->
FocusedItem
].
wID
;
hi
.
hItemHandle
=
hmenu
;
hi
.
dwContextId
=
menu
->
dwContextHelpID
;
hi
.
MousePos
=
msg
.
pt
;
SendMessageA
(
hwnd
,
WM_HELP
,
0
,
(
LPARAM
)
&
hi
);
break
;
}
default:
break
;
}
...
...
include/menu.h
View file @
33026a2a
...
...
@@ -11,6 +11,7 @@ LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam,
LPARAM
lParam
);
extern
BOOL
MENU_Init
(
void
);
extern
BOOL
MENU_IsMenuActive
(
void
);
extern
HMENU
MENU_GetSysMenu
(
HWND
hWndOwner
,
HMENU
hSysPopup
);
extern
UINT
MENU_GetMenuBarHeight
(
HWND
hwnd
,
UINT
menubarWidth
,
INT
orgX
,
INT
orgY
);
...
...
windows/message.c
View file @
33026a2a
...
...
@@ -27,6 +27,7 @@
#include "selectors.h"
#include "thread.h"
#include "options.h"
#include "menu.h"
#include "struct32.h"
#include "debugtools.h"
...
...
@@ -422,6 +423,28 @@ static DWORD MSG_TranslateKbdMsg( HWND hTopWnd, DWORD first, DWORD last,
*/
static
DWORD
MSG_ProcessKbdMsg
(
MSG
*
msg
,
BOOL
remove
)
{
/* Handle F1 key by sending out WM_HELP message */
if
((
msg
->
message
==
WM_KEYUP
)
&&
(
msg
->
wParam
==
VK_F1
)
&&
(
msg
->
hwnd
!=
GetDesktopWindow
())
&&
!
MENU_IsMenuActive
())
{
HELPINFO
hi
;
WND
*
pWnd
=
WIN_FindWndPtr
(
msg
->
hwnd
);
if
(
NULL
!=
pWnd
)
{
hi
.
cbSize
=
sizeof
(
HELPINFO
);
hi
.
iContextType
=
HELPINFO_WINDOW
;
hi
.
iCtrlId
=
pWnd
->
wIDmenu
;
hi
.
hItemHandle
=
msg
->
hwnd
;
hi
.
dwContextId
=
pWnd
->
helpContext
;
hi
.
MousePos
=
msg
->
pt
;
SendMessageA
(
msg
->
hwnd
,
WM_HELP
,
0
,
(
LPARAM
)
&
hi
);
}
WIN_ReleaseWndPtr
(
pWnd
);
}
return
(
HOOK_CallHooks16
(
WH_KEYBOARD
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
)
?
SYSQ_MSG_SKIP
:
SYSQ_MSG_ACCEPT
);
...
...
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