mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 10:22:59 +00:00
GetMenuStringA and GetMenuStringW inverted the MF_BYPOSITION parameter. Buffers were incorrectly copied in and wrong size returned in GetMenuItemInfoA ansi-structures.
GetMenuString now works the same on both windows and ROS. svn path=/trunk/; revision=16594
This commit is contained in:
parent
5638b3729f
commit
431d4a6295
1 changed files with 11 additions and 12 deletions
|
@ -3772,7 +3772,7 @@ GetMenuItemInfoA(
|
||||||
|
|
||||||
RtlCopyMemory(mii, &miiW, miiW.cbSize);
|
RtlCopyMemory(mii, &miiW, miiW.cbSize);
|
||||||
mii->dwTypeData = AnsiBuffer;
|
mii->dwTypeData = AnsiBuffer;
|
||||||
|
mii->cch = strlen(AnsiBuffer);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3864,11 +3864,11 @@ GetMenuStringA(
|
||||||
MENUITEMINFOA mii;
|
MENUITEMINFOA mii;
|
||||||
mii.dwTypeData = lpString;
|
mii.dwTypeData = lpString;
|
||||||
mii.fMask = MIIM_STRING;
|
mii.fMask = MIIM_STRING;
|
||||||
|
mii.fType = MF_STRING;
|
||||||
mii.cbSize = sizeof(MENUITEMINFOA);
|
mii.cbSize = sizeof(MENUITEMINFOA);
|
||||||
mii.cch = nMaxCount;
|
mii.cch = nMaxCount;
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
if(!(GetMenuItemInfoA( hMenu, uIDItem, (BOOL)(MF_BYPOSITION & uFlag),&mii)))
|
||||||
if(!(GetMenuItemInfoA( hMenu, uIDItem, (BOOL)!(MF_BYPOSITION & uFlag),&mii)))
|
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return mii.cch;
|
return mii.cch;
|
||||||
|
@ -3893,8 +3893,7 @@ GetMenuStringW(
|
||||||
miiW.cbSize = sizeof(MENUITEMINFOW);
|
miiW.cbSize = sizeof(MENUITEMINFOW);
|
||||||
miiW.cch = nMaxCount;
|
miiW.cch = nMaxCount;
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
if(!(GetMenuItemInfoW( hMenu, uIDItem, (BOOL)(MF_BYPOSITION & uFlag),&miiW)))
|
||||||
if(!(GetMenuItemInfoW( hMenu, uIDItem, (BOOL)!(MF_BYPOSITION & uFlag),&miiW)))
|
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return miiW.cch;
|
return miiW.cch;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue