IShellMenu::Initialize method (shobjidl_core.h)
Initializes a menu band.
Syntax
HRESULT Initialize(
[in, optional] IShellMenuCallback *psmc,
[in] UINT uId,
[in] UINT uIdAncestor,
[in] DWORD dwFlags
);
Parameters
[in, optional] psmc
Type: IShellMenuCallback*
A pointer to an IShellMenuCallback interface. This interface receives notifications from the menu. This value can be NULL.
[in] uId
Type: UINT
The identifier of the selected menu item. Set this parameter to -1 for the menu itself.
[in] uIdAncestor
Type: UINT
[in] dwFlags
Type: DWORD
Flags that control how the menu operates.
A combination of the following option values:
Value | Meaning |
---|---|
|
No options. |
|
Do not allow drag-and-drop. |
|
This is the top band. |
|
Do not destroy the band when the window is closed. |
In addition to the values above, one of the following layout options:
Value | Meaning |
---|---|
|
Specifies a vertical band. |
|
Specifies a horizontal band. |
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 |