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 |
); |
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.
The DestroyMenu function is used, before an application closes, to destroy the menu and free memory that the loaded menu occupied.