LoadMenu function user32

Win32Result<HMENU> LoadMenu(
  1. HINSTANCE? hInstance,
  2. PCWSTR lpMenuName
)

Loads the specified menu resource from the executable (.exe) file associated with an application instance.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-loadmenuw.

Implementation

Win32Result<HMENU> LoadMenu(HINSTANCE? hInstance, PCWSTR lpMenuName) {
  final result_ = LoadMenuW_Wrapper(hInstance ?? nullptr, lpMenuName);
  return Win32Result(value: HMENU(result_.value.ptr), error: result_.error);
}