解决方案 »

  1.   

    The LoadMenuIndirect function loads the specified menu template in memory. SyntaxHMENU LoadMenuIndirect(          CONST MENUTEMPLATE *lpMenuTemplate
    );
    ParameterslpMenuTemplate
    [in] Pointer to a menu template or an extended menu template. A menu template consists of a MENUITEMTEMPLATEHEADER structure followed by one or more contiguous MENUITEMTEMPLATE structures. An extended menu template consists of a MENUEX_TEMPLATE_HEADER structure followed by one or more contiguous MENUEX_TEMPLATE_ITEM structures. 
    Return ValueIf the function succeeds, the return value is a handle to the menu.If the function fails, the return value is NULL. To get extended error information, call GetLastError. 
    ResFor both the ANSI and the Unicode version of this function, the strings in the MENUITEMTEMPLATE structure must be Unicode strings. Windows 95/98/Me: LoadMenuIndirectW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems World Wide Web link.