mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Implement GetMenuItemInfoA/W
svn path=/trunk/; revision=9297
This commit is contained in:
parent
73812409b4
commit
a02cf9bbfb
1 changed files with 45 additions and 15 deletions
|
@ -21,7 +21,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: menu.c,v 1.64 2004/04/15 23:36:02 weiden Exp $
|
/* $Id: menu.c,v 1.65 2004/05/03 22:16:09 gvg Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/menu.c
|
* FILE: lib/user32/windows/menu.c
|
||||||
|
@ -3726,33 +3726,63 @@ GetMenuItemID(HMENU hMenu,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
GetMenuItemInfoA(
|
GetMenuItemInfoA(
|
||||||
HMENU hMenu,
|
HMENU Menu,
|
||||||
UINT uItem,
|
UINT Item,
|
||||||
BOOL fByPosition,
|
BOOL ByPosition,
|
||||||
LPMENUITEMINFOA lpmii)
|
LPMENUITEMINFOA mii)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
LPSTR AString;
|
||||||
return FALSE;
|
UINT ACch;
|
||||||
|
|
||||||
|
if (0 == (mii->fMask & (MIIM_STRING | MIIM_TYPE)))
|
||||||
|
{
|
||||||
|
/* No text requested, just pass on */
|
||||||
|
return NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO) mii, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
AString = mii->dwTypeData;
|
||||||
|
ACch = mii->cch;
|
||||||
|
mii->dwTypeData = HeapAlloc(GetProcessHeap(), 0, mii->cch * sizeof(WCHAR));
|
||||||
|
if (NULL == mii->dwTypeData)
|
||||||
|
{
|
||||||
|
mii->dwTypeData = AString;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (! NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO) mii, FALSE))
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, mii->dwTypeData);
|
||||||
|
mii->dwTypeData = AString;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IS_STRING_ITEM(mii->fType))
|
||||||
|
{
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, (LPWSTR) mii->dwTypeData, mii->cch, AString, ACch,
|
||||||
|
NULL, NULL);
|
||||||
|
}
|
||||||
|
HeapFree(GetProcessHeap(), 0, mii->dwTypeData);
|
||||||
|
mii->dwTypeData = AString;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
GetMenuItemInfoW(
|
GetMenuItemInfoW(
|
||||||
HMENU hMenu,
|
HMENU Menu,
|
||||||
UINT uItem,
|
UINT Item,
|
||||||
BOOL fByPosition,
|
BOOL ByPosition,
|
||||||
LPMENUITEMINFOW lpmii)
|
LPMENUITEMINFOW mii)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO) mii, FALSE);
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue