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
b3ec0309
Commit
b3ec0309
authored
Aug 18, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added proper support for 32-bit WM_NEXTMENU.
parent
4ff32c8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
8 deletions
+41
-8
menu.c
controls/menu.c
+10
-6
winproc.c
windows/winproc.c
+31
-2
No files found.
controls/menu.c
View file @
b3ec0309
...
...
@@ -2323,16 +2323,20 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
if
(
(
vk
==
VK_LEFT
&&
menu
->
FocusedItem
==
0
)
||
(
vk
==
VK_RIGHT
&&
menu
->
FocusedItem
==
menu
->
nItems
-
1
))
{
MDINEXTMENU
next_menu
;
HMENU
hNewMenu
;
HWND
hNewWnd
;
UINT
id
=
0
;
LRESULT
l
=
SendMessageA
(
pmt
->
hOwnerWnd
,
WM_NEXTMENU
,
vk
,
(
IS_SYSTEM_MENU
(
menu
))
?
GetSubMenu
(
pmt
->
hTopMenu
,
0
)
:
pmt
->
hTopMenu
);
next_menu
.
hmenuIn
=
(
IS_SYSTEM_MENU
(
menu
))
?
GetSubMenu
(
pmt
->
hTopMenu
,
0
)
:
pmt
->
hTopMenu
;
next_menu
.
hmenuNext
=
0
;
next_menu
.
hwndNext
=
0
;
SendMessageW
(
pmt
->
hOwnerWnd
,
WM_NEXTMENU
,
vk
,
(
LPARAM
)
&
next_menu
);
TRACE
(
"%04x [%04x] -> %04x [%04x]
\n
"
,
(
UINT16
)
pmt
->
hCurrentMenu
,
(
UINT16
)
pmt
->
hOwnerWnd
,
LOWORD
(
l
),
HIWORD
(
l
)
);
pmt
->
hCurrentMenu
,
pmt
->
hOwnerWnd
,
next_menu
.
hmenuNext
,
next_menu
.
hwndNext
);
if
(
l
==
0
)
if
(
!
next_menu
.
hmenuNext
||
!
next_menu
.
hwndNext
)
{
DWORD
style
=
GetWindowLongA
(
pmt
->
hOwnerWnd
,
GWL_STYLE
);
hNewWnd
=
pmt
->
hOwnerWnd
;
...
...
@@ -2357,8 +2361,8 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
}
else
/* application returned a new menu to switch to */
{
hNewMenu
=
LOWORD
(
l
)
;
hNewWnd
=
HIWORD
(
l
)
;
hNewMenu
=
next_menu
.
hmenuNext
;
hNewWnd
=
next_menu
.
hwndNext
;
if
(
IsMenu
(
hNewMenu
)
&&
IsWindow
(
hNewWnd
)
)
{
...
...
windows/winproc.c
View file @
b3ec0309
...
...
@@ -1309,9 +1309,18 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
*
plparam
=
(
LPARAM
)
idThread
;
}
return
0
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
next
)
);
if
(
!
next
)
return
-
1
;
next
->
hmenuIn
=
*
plparam
;
next
->
hmenuNext
=
0
;
next
->
hwndNext
=
0
;
*
plparam
=
(
LPARAM
)
next
;
return
1
;
}
case
WM_PAINTCLIPBOARD
:
case
WM_SIZECLIPBOARD
:
case
WM_NEXTMENU
:
FIXME_
(
msg
)(
"message %04x needs translation
\n
"
,
msg16
);
return
-
1
;
...
...
@@ -1415,6 +1424,13 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lP
HeapFree
(
GetProcessHeap
(),
0
,
msg32
);
}
break
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
result
=
MAKELONG
(
next
->
hmenuNext
,
next
->
hwndNext
);
HeapFree
(
GetProcessHeap
(),
0
,
next
);
}
break
;
}
return
result
;
}
...
...
@@ -2036,9 +2052,14 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_ACTIVATEAPP
:
if
(
*
plparam
)
*
plparam
=
(
LPARAM
)
THREAD_IdToTEB
((
DWORD
)
*
plparam
)
->
htask16
;
return
0
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
*
plparam
;
*
plparam
=
next
->
hmenuIn
;
return
1
;
}
case
WM_PAINTCLIPBOARD
:
case
WM_SIZECLIPBOARD
:
case
WM_NEXTMENU
:
FIXME_
(
msg
)(
"message %04x needs translation
\n
"
,
msg32
);
return
-
1
;
/* following messages should not be sent to 16-bit apps */
...
...
@@ -2207,6 +2228,14 @@ void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
SEGPTR_FREE
(
msg16
);
}
break
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
next
->
hmenuNext
=
LOWORD
(
p16
->
lResult
);
next
->
hwndNext
=
HIWORD
(
p16
->
lResult
);
p16
->
lResult
=
0
;
}
break
;
}
}
...
...
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