mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 17:35:07 +00:00
User32: Menu.c I found a small problem with drawing menu popups. This fixes the problem.
svn path=/trunk/; revision=23070
This commit is contained in:
parent
a7dcf72d50
commit
c1685e75b7
|
@ -4008,9 +4008,12 @@ GetMenuItemInfoA(
|
||||||
if (!NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO)&miiW, FALSE))
|
if (!NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO)&miiW, FALSE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
RtlCopyMemory(mii, &miiW, miiW.cbSize);
|
||||||
|
|
||||||
if (!AnsiBuffer || !Count)
|
if (!AnsiBuffer || !Count)
|
||||||
{
|
{
|
||||||
if (miiW.dwTypeData) RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
if (miiW.dwTypeData) RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
||||||
|
mii->dwTypeData = AnsiBuffer;
|
||||||
mii->cch = miiW.cch;
|
mii->cch = miiW.cch;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4022,7 +4025,6 @@ GetMenuItemInfoA(
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
||||||
RtlCopyMemory(mii, &miiW, miiW.cbSize);
|
|
||||||
mii->dwTypeData = AnsiBuffer;
|
mii->dwTypeData = AnsiBuffer;
|
||||||
mii->cch = strlen(AnsiBuffer);
|
mii->cch = strlen(AnsiBuffer);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -4071,9 +4073,12 @@ GetMenuItemInfoW(
|
||||||
if (!NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO) &miiW, FALSE))
|
if (!NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO) &miiW, FALSE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
RtlCopyMemory(mii, &miiW, miiW.cbSize); // looks okay to over right user data.
|
||||||
|
|
||||||
if (!String || !Count)
|
if (!String || !Count)
|
||||||
{
|
{
|
||||||
if (miiW.dwTypeData) RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
if (miiW.dwTypeData) RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
||||||
|
mii->dwTypeData = String; // may not be zero.
|
||||||
mii->cch = miiW.cch;
|
mii->cch = miiW.cch;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4084,7 +4089,6 @@ GetMenuItemInfoW(
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
RtlFreeHeap(GetProcessHeap(), 0, miiW.dwTypeData);
|
||||||
RtlCopyMemory(mii, &miiW, miiW.cbSize);
|
|
||||||
mii->dwTypeData = String;
|
mii->dwTypeData = String;
|
||||||
mii->cch = strlenW(String);
|
mii->cch = strlenW(String);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue