don't ignore requested height for non-menubar ownerdraw popups :)
Felix Nawothnig
felix.nawothnig at t-online.de
Sun May 8 18:56:44 CDT 2005
Please ignore last patch, see WD.
ChangeLog:
Initialize itemHeight with DPI / 6 before sending WM_MEASUREITEM
-------------- next part --------------
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 23:53:33 -0000
@@ -882,7 +882,12 @@
mis.CtlID = 0;
mis.itemID = lpitem->wID;
mis.itemData = (DWORD)lpitem->dwItemData;
- mis.itemHeight = 0;
+ /*
+ ** (Undocumented) Before sending WM_MEASUREITEM Windows initializes
+ ** itemHeight with some value depending on the set DPI - experiments
+ ** show that itemHeight is DPI / 6 on WinNT and DPI / 7 on Win9x.
+ */
+ mis.itemHeight = GetDeviceCaps( GetDC(NULL), LOGPIXELSY ) / 6;
mis.itemWidth = 0;
SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis );
lpitem->rect.right += mis.itemWidth;
More information about the wine-patches
mailing list