From aab85d72bd57445eba36e7a2a2abf5f5c68a13b3 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 15 Jan 2001 20:21:15 +0000 Subject: [PATCH] Initialize MENUITEMINFO structure before calling GetMenuItemInfo. --- windows/mdi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/windows/mdi.c b/windows/mdi.c index 7f66fe77ede..13a43dcbb6c 100644 --- a/windows/mdi.c +++ b/windows/mdi.c @@ -1100,7 +1100,7 @@ static BOOL MDI_AugmentFrameMenu( MDICLIENTINFO* ci, WND *frame, */ static BOOL MDI_RestoreFrameMenu( WND *frameWnd, HWND hChild ) { - MENUITEMINFOA menuInfo; + MENUITEMINFOW menuInfo; INT nItems = GetMenuItemCount(frameWnd->wIDmenu) - 1; UINT iId = GetMenuItemID(frameWnd->wIDmenu,nItems) ; @@ -1114,10 +1114,11 @@ static BOOL MDI_RestoreFrameMenu( WND *frameWnd, HWND hChild ) * Remove the system menu, If that menu is the icon of the window * as it is in win95, we have to delete the bitmap. */ - menuInfo.cbSize = sizeof(MENUITEMINFOA); + memset(&menuInfo, 0, sizeof(menuInfo)); + menuInfo.cbSize = sizeof(menuInfo); menuInfo.fMask = MIIM_DATA | MIIM_TYPE; - GetMenuItemInfoA(frameWnd->wIDmenu, + GetMenuItemInfoW(frameWnd->wIDmenu, 0, TRUE, &menuInfo); -- 2.11.4.GIT