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
efaa068c
Commit
efaa068c
authored
Jun 21, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Always pass 0 as item id for WM_MEASUREITEM in menus.
parent
33ba7c07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
menu.c
dlls/user32/menu.c
+1
-1
menu.c
dlls/user32/tests/menu.c
+4
-0
No files found.
dlls/user32/menu.c
View file @
efaa068c
...
...
@@ -822,7 +822,7 @@ static void MENU_GetBitmapItemSize( MENUITEM *lpitem, SIZE *size,
measItem
.
itemWidth
=
lpitem
->
rect
.
right
-
lpitem
->
rect
.
left
;
measItem
.
itemHeight
=
lpitem
->
rect
.
bottom
-
lpitem
->
rect
.
top
;
measItem
.
itemData
=
lpitem
->
dwItemData
;
SendMessageW
(
hwndOwner
,
WM_MEASUREITEM
,
lpitem
->
wID
,
(
LPARAM
)
&
measItem
);
SendMessageW
(
hwndOwner
,
WM_MEASUREITEM
,
0
,
(
LPARAM
)
&
measItem
);
size
->
cx
=
measItem
.
itemWidth
;
size
->
cy
=
measItem
.
itemHeight
;
return
;
...
...
dlls/user32/tests/menu.c
View file @
efaa068c
...
...
@@ -169,6 +169,8 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
if
(
winetest_debug
)
trace
(
"WM_MEASUREITEM received data %lx size %dx%d
\n
"
,
pmis
->
itemData
,
pmis
->
itemWidth
,
pmis
->
itemHeight
);
ok
(
!
wparam
,
"wrong wparam %lx
\n
"
,
wparam
);
ok
(
pmis
->
CtlType
==
ODT_MENU
,
"wrong type %x
\n
"
,
pmis
->
CtlType
);
MOD_odheight
=
pmis
->
itemHeight
;
pmis
->
itemWidth
=
MODsizes
[
pmis
->
itemData
].
cx
;
pmis
->
itemHeight
=
MODsizes
[
pmis
->
itemData
].
cy
;
...
...
@@ -197,6 +199,8 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
pdis
->
rcItem
.
right
,
pdis
->
rcItem
.
bottom
);
SelectObject
(
pdis
->
hDC
,
oldpen
);
}
ok
(
!
wparam
,
"wrong wparam %lx
\n
"
,
wparam
);
ok
(
pdis
->
CtlType
==
ODT_MENU
,
"wrong type %x
\n
"
,
pdis
->
CtlType
);
/* calculate widths of some menu texts */
if
(
!
MOD_txtsizes
[
0
].
size
.
cx
)
for
(
i
=
0
;
MOD_txtsizes
[
i
].
text
;
i
++
)
{
...
...
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