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
79de98f9
Commit
79de98f9
authored
Jun 17, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Insert menu item only after contents of the passed in menu item info have been verified.
parent
1dbe178f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
menu.c
dlls/user32/menu.c
+18
-2
No files found.
dlls/user32/menu.c
View file @
79de98f9
...
...
@@ -4639,6 +4639,9 @@ BOOL WINAPI SetMenuItemInfoA(HMENU hmenu, UINT item, BOOL bypos,
const
MENUITEMINFOA
*
lpmii
)
{
MENUITEMINFOA
mii
;
TRACE
(
"hmenu %p, item %u, by pos %d, info %p
\n
"
,
hmenu
,
item
,
bypos
,
lpmii
);
if
(
lpmii
->
cbSize
!=
sizeof
(
mii
)
&&
lpmii
->
cbSize
!=
sizeof
(
mii
)
-
sizeof
(
mii
.
hbmpItem
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -4660,6 +4663,9 @@ BOOL WINAPI SetMenuItemInfoW(HMENU hmenu, UINT item, BOOL bypos,
const
MENUITEMINFOW
*
lpmii
)
{
MENUITEMINFOW
mii
;
TRACE
(
"hmenu %p, item %u, by pos %d, info %p
\n
"
,
hmenu
,
item
,
bypos
,
lpmii
);
if
(
lpmii
->
cbSize
!=
sizeof
(
mii
)
&&
lpmii
->
cbSize
!=
sizeof
(
mii
)
-
sizeof
(
mii
.
hbmpItem
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -4771,8 +4777,11 @@ UINT WINAPI GetMenuDefaultItem(HMENU hmenu, UINT bypos, UINT flags)
BOOL
WINAPI
InsertMenuItemA
(
HMENU
hMenu
,
UINT
uItem
,
BOOL
bypos
,
const
MENUITEMINFOA
*
lpmii
)
{
MENUITEM
*
item
=
MENU_InsertItem
(
hMenu
,
uItem
,
bypos
?
MF_BYPOSITION
:
0
)
;
MENUITEM
*
item
;
MENUITEMINFOA
mii
;
TRACE
(
"hmenu %p, item %04x, by pos %d, info %p
\n
"
,
hMenu
,
uItem
,
bypos
,
lpmii
);
if
(
lpmii
->
cbSize
!=
sizeof
(
mii
)
&&
lpmii
->
cbSize
!=
sizeof
(
mii
)
-
sizeof
(
mii
.
hbmpItem
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -4783,6 +4792,8 @@ BOOL WINAPI InsertMenuItemA(HMENU hMenu, UINT uItem, BOOL bypos,
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
hbmpItem
=
NULL
;
}
item
=
MENU_InsertItem
(
hMenu
,
uItem
,
bypos
?
MF_BYPOSITION
:
0
);
return
SetMenuItemInfo_common
(
item
,
(
const
MENUITEMINFOW
*
)
&
mii
,
FALSE
);
}
...
...
@@ -4793,8 +4804,11 @@ BOOL WINAPI InsertMenuItemA(HMENU hMenu, UINT uItem, BOOL bypos,
BOOL
WINAPI
InsertMenuItemW
(
HMENU
hMenu
,
UINT
uItem
,
BOOL
bypos
,
const
MENUITEMINFOW
*
lpmii
)
{
MENUITEM
*
item
=
MENU_InsertItem
(
hMenu
,
uItem
,
bypos
?
MF_BYPOSITION
:
0
)
;
MENUITEM
*
item
;
MENUITEMINFOW
mii
;
TRACE
(
"hmenu %p, item %04x, by pos %d, info %p
\n
"
,
hMenu
,
uItem
,
bypos
,
lpmii
);
if
(
lpmii
->
cbSize
!=
sizeof
(
mii
)
&&
lpmii
->
cbSize
!=
sizeof
(
mii
)
-
sizeof
(
mii
.
hbmpItem
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -4805,6 +4819,8 @@ BOOL WINAPI InsertMenuItemW(HMENU hMenu, UINT uItem, BOOL bypos,
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
hbmpItem
=
NULL
;
}
item
=
MENU_InsertItem
(
hMenu
,
uItem
,
bypos
?
MF_BYPOSITION
:
0
);
return
SetMenuItemInfo_common
(
item
,
&
mii
,
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