IShellMenu::Initialize method
Initializes a menu band.
Syntax
HRESULT Initialize( [in, optional] IShellMenuCallback *psmc, [in] UINT uId, [in] UINT uIdAncestor, [in] DWORD dwFlags );
Parameters
- psmc [in, optional]
-
Type: IShellMenuCallback*
A pointer to an IShellMenuCallback interface. This interface receives notifications from the menu. This value can be NULL.
- uId [in]
-
Type: UINT
The identifier of the selected menu item. Set this parameter to -1 for the menu itself.
- uIdAncestor [in]
-
Type: UINT
- dwFlags [in]
-
Type: DWORD
Flags that control how the menu operates.
A combination of the following option values:
Value Meaning - SMINIT_DEFAULT
No options.
- SMINIT_RESTRICT_DRAGDROP
Do not allow drag-and-drop.
- SMINIT_TOPLEVEL
This is the top band.
- SMINIT_CACHED
Do not destroy the band when the window is closed.
In addition to the values above, one of the following layout options:
Value Meaning - SMINIT_VERTICAL
Specifies a vertical band.
- SMINIT_HORIZONTAL
Specifies a horizontal band.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
|
Minimum supported client |
Windows XP with SP2 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
IDL |
|
|
DLL |
|