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
4727423f
Commit
4727423f
authored
Feb 13, 1999
by
Pascal Lessard
Committed by
Alexandre Julliard
Feb 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the GetMenuItemRect to comply with windows API.
parent
c70dc833
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
menu.c
controls/menu.c
+26
-18
No files found.
controls/menu.c
View file @
4727423f
...
...
@@ -759,6 +759,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND32 hwndOwner )
++
orgY
;
MENU_CalcItemSize
(
hdc
,
lpitem
,
hwndOwner
,
orgX
,
orgY
,
FALSE
);
if
(
lpitem
->
fType
&
MF_MENUBARBREAK
)
orgX
++
;
maxX
=
MAX
(
maxX
,
lpitem
->
rect
.
right
);
orgY
=
lpitem
->
rect
.
bottom
;
...
...
@@ -829,6 +830,7 @@ static void MENU_MenuBarCalcSize( HDC32 hdc, LPRECT32 lprect,
orgX
,
orgY
);
debug_print_menuitem
(
" item: "
,
lpitem
,
""
);
MENU_CalcItemSize
(
hdc
,
lpitem
,
hwndOwner
,
orgX
,
orgY
,
TRUE
);
if
(
lpitem
->
rect
.
right
>
lprect
->
right
)
{
if
(
i
!=
start
)
break
;
...
...
@@ -4091,36 +4093,42 @@ BOOL16 WINAPI CheckMenuRadioItem16(HMENU16 hMenu,
/**********************************************************************
* GetMenuItemRect32 (USER32.266)
*
* ATTENTION: Here, the returned values in rect are the screen
* coordinates of the item just like if the menu was
* always on the upper left side of the application.
*
*/
BOOL32
WINAPI
GetMenuItemRect32
(
HWND32
hwnd
,
HMENU32
hMenu
,
UINT32
uItem
,
LPRECT32
rect
)
{
RECT32
saverect
,
clientrect
;
BOOL32
barp
;
HDC32
hdc
;
WND
*
wndPtr
;
POPUPMENU
*
itemMenu
;
MENUITEM
*
item
;
H
MENU32
orghMenu
=
hMenu
;
H
WND32
referenceHwnd
;
TRACE
(
menu
,
"(0x%x,0x%x,%d,%p)
\n
"
,
hwnd
,
hMenu
,
uItem
,
rect
);
TRACE
(
menu
,
"(0x%x,0x%x,%d,%p)
\n
"
,
hwnd
,
hMenu
,
uItem
,
rect
);
item
=
MENU_FindItem
(
&
hMenu
,
&
uItem
,
MF_BYPOSITION
);
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
if
(
!
rect
||
!
item
||
!
wndPtr
)
return
FALSE
;
referenceHwnd
=
hwnd
;
if
(
!
hwnd
)
{
itemMenu
=
(
POPUPMENU
*
)
USER_HEAP_LIN_ADDR
(
hMenu
);
if
(
itemMenu
==
NULL
)
return
FALSE
;
GetClientRect32
(
hwnd
,
&
clientrect
);
hdc
=
GetDCEx32
(
hwnd
,
0
,
DCX_CACHE
|
DCX_WINDOW
);
barp
=
(
hMenu
==
orghMenu
);
if
(
itemMenu
->
hWnd
==
NULL
)
return
FALSE
;
referenceHwnd
=
itemMenu
->
hWnd
;
}
if
((
rect
==
NULL
)
||
(
item
==
NULL
))
return
FALSE
;
saverect
=
item
->
rect
;
MENU_CalcItemSize
(
hdc
,
item
,
hwnd
,
clientrect
.
left
,
clientrect
.
top
,
barp
);
*
rect
=
item
->
rect
;
item
->
rect
=
saverect
;
ReleaseDC32
(
hwnd
,
hdc
);
MapWindowPoints32
(
referenceHwnd
,
0
,
(
LPPOINT32
)
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