mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
Fix call to GetMenuItemInfo and unicodify while we're at it.
This commit is contained in:
parent
bcd8fa3c78
commit
91358d76c3
1 changed files with 7 additions and 6 deletions
|
@ -1961,14 +1961,14 @@ HRESULT WINAPI IUnknown_HandleIRestrict(LPUNKNOWN lpUnknown, PVOID lpArg1,
|
|||
*/
|
||||
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 x)
|
|||
*/
|
||||
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++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue