Hi,

This is my documentation on LoadMenu:

The LoadMenu function loads the specified menu resource from the executable (.EXE) file associated with an application instance. 

HMENU LoadMenu(
    HINSTANCE hInstance, // handle of application instance
    LPCTSTR lpMenuName // menu name string or menu-resource identifier 
  );


Parameters

hInstance

Identifies the instance of the module containing the menu resource to be loaded.

lpMenuName

Points to a null-terminated string that contains the name of the menu resource.
ALTERNATIVELY, this parameter can consist of the resource identifier in the low-order word
and zero in the high-order word. To create this value, use the MAKEINTRESOURCE macro.

Return Values

If the function succeeds, the return value is the handle of the menu resource.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.


What does this word "ALTERNATIVELY" mean?
When I read it I thought I had the choice of using either the Name or the ID of the menu to identify the resource.
But in fact I was only able to use the Name if my menu didn't have an ID!
On the other hand: When my menu had an ID, I wasn't able to use the name. Only the ID!

Can anybody confirm this is the intended behaviour!
Or is there a way to be able to having the choice of using either the Name or the ID, if the menu has an ID?

Friendly regards,
mdevries.
Posted on 2006-12-02 06:17:20 by mdevries
Hi mdevries
The "ALTERNATIVELY" means that you can use an ID or a name to identify your menu, not both. If you define your menu resource with an ID, you must to use this ID to load it. The same applies to the use of the name.

Regards,

Biterider
Posted on 2006-12-02 10:29:39 by Biterider
Thanks Biterider, for your confirmation.

Friendly regards,
mdevries.
Posted on 2006-12-02 11:09:07 by mdevries