IShellMenu::SetMenu method (shobjidl_core.h)
Appends a static menu to the menu band.
Syntax
HRESULT SetMenu(
[in] HMENU hmenu,
[in] HWND hwnd,
[in] DWORD dwFlags
);
Parameters
[in] hmenu
Type: HMENU
The handle of the static menu that is to be appended. This value can be NULL.
[in] hwnd
Type: HWND
The HWND of the owner window. This value can be NULL.
[in] dwFlags
Type: DWORD
Flags that specify how the menu operates.
SMSET_BOTTOM
Attach the menu to the bottom of the parent menu.
SMSET_TOP
Attach the menu to the top of the parent menu.
SMSET_DONTOWN
The menu band does not own the menu named in hwnd, so should that menu eventually be replaced, it should not be destroyed.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
DLL | Shell32.dll |