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
d4d0247f
Commit
d4d0247f
authored
Mar 28, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Mar 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Simplify GetMenuItemRect().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c72a7219
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
menu.c
dlls/user32/menu.c
+9
-18
No files found.
dlls/user32/menu.c
View file @
d4d0247f
...
...
@@ -5105,35 +5105,26 @@ BOOL WINAPI CheckMenuRadioItem(HMENU hMenu,
* always on the upper left side of the application.
*
*/
BOOL
WINAPI
GetMenuItemRect
(
HWND
hwnd
,
HMENU
hMenu
,
UINT
uItem
,
LPRECT
rect
)
BOOL
WINAPI
GetMenuItemRect
(
HWND
hwnd
,
HMENU
hMenu
,
UINT
uItem
,
RECT
*
rect
)
{
POPUPMENU
*
itemM
enu
;
POPUPMENU
*
m
enu
;
MENUITEM
*
item
;
HWND
referenceHwnd
;
TRACE
(
"(%p,%p,%d,%p)
\n
"
,
hwnd
,
hMenu
,
uItem
,
rect
);
item
=
MENU_FindItem
(
&
hMenu
,
&
uItem
,
MF_BYPOSITION
);
referenceHwnd
=
hwnd
;
if
(
!
hwnd
)
{
itemMenu
=
MENU_GetMenu
(
hMenu
);
if
(
itemMenu
==
NULL
)
return
FALSE
;
if
((
rect
==
NULL
)
||
(
item
==
NULL
))
return
FALSE
;
if
(
itemMenu
->
hWnd
==
0
)
return
FALSE
;
referenceHwnd
=
itemMenu
->
hWnd
;
}
menu
=
MENU_GetMenu
(
hMenu
);
if
(
!
menu
)
return
FALSE
;
if
(
(
rect
==
NULL
)
||
(
item
==
NULL
))
return
FALSE
;
if
(
!
hwnd
)
hwnd
=
menu
->
hWnd
;
if
(
!
hwnd
)
return
FALSE
;
*
rect
=
item
->
rect
;
MapWindowPoints
(
referenceHwnd
,
0
,
(
LPPOINT
)
rect
,
2
);
MapWindowPoints
(
hwnd
,
0
,
(
POINT
*
)
rect
,
2
);
return
TRUE
;
}
...
...
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