LoadMenuIndirect  61AO_LZ 

The LoadMenuIndirect function loads the specified menu template in memory.

HMENU LoadMenuIndirect(

    CONST MENUTEMPLATE *lpMenuTemplate

// address of menu template

   );

 

 

Parameters

lpMenuTemplate

Points to a menu template or an extended menu template.

A menu template consists of a MENUITEMTEMPLATEHEADERLMYG23 structure followed by one or more contiguous MENUITEMTEMPLATE2NMWVS structures. An extended menu template consists of a MENUEX_TEMPLATE_HEADER9K4FWC structure followed by one or more contiguous MENUEX_TEMPLATE_ITEM1CHH18S structures.

 

Return Values

If the function succeeds, the return value is the handle of the menu.

If the function fails, the return value is NULL. To get extended error information, call GetLastError11C2VS7.

Remarks

For both the ANSI and the Unicode version of this function, the strings in the MENUITEMTEMPLATE structure must be Unicode strings.

See Also

LoadMenu, MENUEX_TEMPLATE_HEADER, MENUEX_TEMPLATE_ITEM, MENUITEMTEMPLATE, MENUITEMTEMPLATEHEADER