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
33ba7c07
Commit
33ba7c07
authored
Jun 21, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Don't truncate bitmap ids in InsertMenu.
parent
6b0d9ff1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
menu.c
dlls/user32/menu.c
+1
-1
menu.c
dlls/user32/tests/menu.c
+13
-0
No files found.
dlls/user32/menu.c
View file @
33ba7c07
...
@@ -3816,7 +3816,7 @@ static void MENU_mnu2mnuii( UINT flags, UINT_PTR id, LPCWSTR str,
...
@@ -3816,7 +3816,7 @@ static void MENU_mnu2mnuii( UINT flags, UINT_PTR id, LPCWSTR str,
pmii
->
dwTypeData
=
(
LPWSTR
)
str
;
pmii
->
dwTypeData
=
(
LPWSTR
)
str
;
}
else
if
(
flags
&
MFT_BITMAP
){
}
else
if
(
flags
&
MFT_BITMAP
){
pmii
->
fMask
|=
MIIM_BITMAP
|
MIIM_STRING
;
pmii
->
fMask
|=
MIIM_BITMAP
|
MIIM_STRING
;
pmii
->
hbmpItem
=
ULongToHandle
(
LOWORD
(
str
))
;
pmii
->
hbmpItem
=
(
HBITMAP
)
str
;
}
}
if
(
flags
&
MF_OWNERDRAW
){
if
(
flags
&
MF_OWNERDRAW
){
pmii
->
fMask
|=
MIIM_DATA
;
pmii
->
fMask
|=
MIIM_DATA
;
...
...
dlls/user32/tests/menu.c
View file @
33ba7c07
...
@@ -404,6 +404,7 @@ static void test_menu_ownerdraw(void)
...
@@ -404,6 +404,7 @@ static void test_menu_ownerdraw(void)
int
i
,
j
,
k
;
int
i
,
j
,
k
;
BOOL
ret
;
BOOL
ret
;
HMENU
hmenu
;
HMENU
hmenu
;
MENUITEMINFO
mii
;
LONG
leftcol
;
LONG
leftcol
;
HWND
hwnd
=
CreateWindowEx
(
0
,
MAKEINTATOM
(
atomMenuCheckClass
),
NULL
,
HWND
hwnd
=
CreateWindowEx
(
0
,
MAKEINTATOM
(
atomMenuCheckClass
),
NULL
,
WS_VISIBLE
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
200
,
200
,
WS_VISIBLE
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
200
,
200
,
...
@@ -463,6 +464,18 @@ static void test_menu_ownerdraw(void)
...
@@ -463,6 +464,18 @@ static void test_menu_ownerdraw(void)
"Height is incorrect. Got %d expected %d
\n
"
,
"Height is incorrect. Got %d expected %d
\n
"
,
MOD_rc
[
0
].
bottom
-
MOD_rc
[
0
].
top
,
MOD_SIZE
);
MOD_rc
[
0
].
bottom
-
MOD_rc
[
0
].
top
,
MOD_SIZE
);
/* test owner-drawn callback bitmap */
ModifyMenu
(
hmenu
,
1
,
MF_BYPOSITION
|
MFT_BITMAP
,
1
,
(
LPCSTR
)
HBMMENU_CALLBACK
);
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
fMask
=
MIIM_BITMAP
|
MIIM_FTYPE
|
MIIM_ID
;
if
(
GetMenuItemInfoA
(
hmenu
,
1
,
TRUE
,
&
mii
))
{
ok
(
mii
.
fType
==
MFT_BITMAP
,
"wrong type %x
\n
"
,
mii
.
fType
);
ok
(
mii
.
wID
==
1
,
"wrong id %x
\n
"
,
mii
.
wID
);
ok
(
mii
.
hbmpItem
==
HBMMENU_CALLBACK
,
"wrong data %p
\n
"
,
mii
.
hbmpItem
);
}
TrackPopupMenu
(
hmenu
,
TPM_RETURNCMD
,
100
,
100
,
0
,
hwnd
,
NULL
);
/* test width/height of an ownerdraw menu bar as well */
/* test width/height of an ownerdraw menu bar as well */
ret
=
DestroyMenu
(
hmenu
);
ret
=
DestroyMenu
(
hmenu
);
ok
(
ret
,
"DestroyMenu failed with error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DestroyMenu failed with error %d
\n
"
,
GetLastError
());
...
...
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