Exemplo n.º 1
0
/* MAKE_EXPORT GetMenuStringW_new=GetMenuStringW */
int WINAPI GetMenuStringW_new(HMENU hMenu, UINT uIDItem, LPWSTR lpString, int nMaxCount, UINT uFlag)
{
	LPSTR lpBuffer = (LPSTR)malloc(nMaxCount);
	int result;

	if(lpBuffer == NULL)
		return FALSE;

	result = GetMenuStringA(hMenu, uIDItem, lpBuffer, nMaxCount, uFlag);

	if(!result)
	{
		free(lpBuffer);
		return FALSE;
	}

	STACK_AtoW(lpBuffer, lpString);

	free(lpBuffer);

	return TRUE;
}
Exemplo n.º 2
0
Arquivo: gvwmisc.c Projeto: 131/gsview
/* get text of menu item */
int
get_menu_string(int menuid, int itemid, char *str, int len)
{
    return GetMenuStringA(hmenu, itemid, str, len, MF_BYCOMMAND);
}