[PATCH] WM_INITMENU
Gerard Patel
gerard.patel at nerim.net
Sun Jul 15 19:28:35 CDT 2001
This is a resend of a patch by Maciek Kaliszewski (kenon at go2.pl)
http://www.integrita.com/cgi-local/lwgate.pl/WINE-PATCHES/archives/2001-05/A
uthor/article-90.html
Basically I had objected to the part of his patch about menu.c, but I think
now that Maciek's version is better than the code it replaces (me being the
culprit for the old code)
ChangeLog:
* controls/menu.c
Draw MenuBar in proper place (some cases).
-------------- next part --------------
Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.123
diff -u -r1.123 menu.c
--- controls/menu.c 2001/07/10 19:06:12 1.123
+++ controls/menu.c 2001/07/15 22:05:15
@@ -2914,12 +2914,9 @@
if ((menu = MENU_GetMenu( hMenu )) && (!menu->Height))
{ /* app changed/recreated menu bar entries in WM_INITMENU
Recalculate menu sizes else clicks will not work */
- RECT r;
- HDC hdc = GetDCEx( hWnd, 0, DCX_CACHE | DCX_WINDOW );
- SelectObject( hdc, hMenuFont);
- GetClientRect(hWnd, &r); /* probably too simple */
- MENU_MenuBarCalcSize( hdc, &r, menu, hWnd );
- ReleaseDC(hWnd, hdc);
+ SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
+
}
}
return TRUE;
-------------- next part --------------
More information about the wine-patches
mailing list