On 05/08/2005 12:25:18 PM, Rein Klazes wrote:
That does not seem correct on the Win2k system that I am using for
testing.

Right. Windows sets itemHeight before and not after WM_MEASUREITEM. Sorry for that.


And it also seems not to be GetSystemMetrics(SM_CYMENU)-1 but a rather strange magic value of 16. (with my test it looked 100% the same ... sigh. I'll go to bed soon. ;)

How about this patch?

-flx
Index: menu.c
===================================================================
RCS file: /home/wine/wine/dlls/user/menu.c,v
retrieving revision 1.26
diff -u -r1.26 menu.c
--- menu.c      19 Apr 2005 09:47:02 -0000      1.26
+++ menu.c      8 May 2005 11:23:59 -0000
@@ -882,7 +882,8 @@
         mis.CtlID      = 0;
         mis.itemID     = lpitem->wID;
         mis.itemData   = (DWORD)lpitem->dwItemData;
-        mis.itemHeight = 0;
+        mis.itemHeight = 16; /* XXX: WinXP sets this - but where does
+                                    this come from? */
         mis.itemWidth  = 0;
         SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis );
         lpitem->rect.right  += mis.itemWidth;

Reply via email to