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
177513a5
Commit
177513a5
authored
Jun 21, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Reimplement SetMenuItemBitmaps on top of NtUserThunkedMenuItemInfo.
parent
269f636d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
20 deletions
+11
-20
menu.c
dlls/user32/menu.c
+11
-20
No files found.
dlls/user32/menu.c
View file @
177513a5
...
...
@@ -714,30 +714,21 @@ DWORD WINAPI GetMenuCheckMarkDimensions(void)
/**********************************************************************
* SetMenuItemBitmaps (USER32.@)
*/
BOOL
WINAPI
SetMenuItemBitmaps
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
,
HBITMAP
hNewUnCheck
,
HBITMAP
hNewCheck
)
BOOL
WINAPI
SetMenuItemBitmaps
(
HMENU
menu
,
UINT
pos
,
UINT
flags
,
HBITMAP
uncheck
,
HBITMAP
check
)
{
POPUPMENU
*
menu
;
MENUITEM
*
item
;
UINT
pos
;
MENUITEMINFOW
info
;
if
(
!
(
menu
=
find_menu_item
(
hMenu
,
nPos
,
wFlags
,
&
pos
)))
info
.
cbSize
=
sizeof
(
info
);
info
.
fMask
=
MIIM_STATE
;
if
(
!
NtUserThunkedMenuItemInfo
(
menu
,
pos
,
flags
,
NtUserGetMenuItemInfoW
,
&
info
,
NULL
))
return
FALSE
;
item
=
&
menu
->
items
[
pos
];
if
(
!
hNewCheck
&&
!
hNewUnCheck
)
{
item
->
fState
&=
~
MF_USECHECKBITMAPS
;
}
else
/* Install new bitmaps */
{
item
->
hCheckBit
=
hNewCheck
;
item
->
hUnCheckBit
=
hNewUnCheck
;
item
->
fState
|=
MF_USECHECKBITMAPS
;
}
release_menu_ptr
(
menu
);
return
TRUE
;
info
.
fMask
=
MIIM_STATE
|
MIIM_CHECKMARKS
;
info
.
hbmpChecked
=
check
;
info
.
hbmpUnchecked
=
uncheck
;
if
(
check
||
uncheck
)
info
.
fState
|=
MF_USECHECKBITMAPS
;
else
info
.
fState
&=
~
MF_USECHECKBITMAPS
;
return
NtUserThunkedMenuItemInfo
(
menu
,
pos
,
flags
,
NtUserSetMenuItemInfo
,
&
info
,
NULL
);
}
...
...
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