shlwapi: GetMenuItemInfo fixes
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Thu Aug 4 11:31:56 CDT 2005
Huw Davies <huw at codeweavers.com>
Fix call to GetMenuItemInfo and unicodify while we're at it.
--
Huw Davies
huw at codeweavers.com
? dlls/shlwapi/shlwapi.spec.def
Index: dlls/shlwapi/ordinal.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/ordinal.c,v
retrieving revision 1.108
diff -u -p -r1.108 ordinal.c
--- dlls/shlwapi/ordinal.c 30 Jun 2005 18:19:33 -0000 1.108
+++ dlls/shlwapi/ordinal.c 4 Aug 2005 16:29:09 -0000
@@ -1961,14 +1961,14 @@ HRESULT WINAPI IUnknown_HandleIRestrict(
*/
HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID)
{
- MENUITEMINFOA mi;
+ MENUITEMINFOW mi;
TRACE("(%p,%uld)\n", hMenu, uID);
- mi.cbSize = sizeof(MENUITEMINFOA);
+ mi.cbSize = sizeof(mi);
mi.fMask = MIIM_SUBMENU;
- if (!GetMenuItemInfoA(hMenu, uID, 0, &mi))
+ if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
return NULL;
return mi.hSubMenu;
@@ -4121,13 +4121,14 @@ BOOL WINAPI SHIsLowMemoryMachine (DWORD
*/
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
{
- MENUITEMINFOA mi;
+ MENUITEMINFOW mi;
INT nCount = GetMenuItemCount(hMenu), nIter = 0;
while (nIter < nCount)
{
- mi.wID = 0;
- if (!GetMenuItemInfoA(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
+ mi.cbSize = sizeof(mi);
+ mi.fMask = MIIM_ID;
+ if (GetMenuItemInfoW(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
return nIter;
nIter++;
}
More information about the wine-patches
mailing list