IShellMenu::SetShellFolder method

Specifies the folder for the menu band to browse.

Syntax


HRESULT SetShellFolder(
  [in] IShellFolder      *psf,
  [in] PCIDLIST_ABSOLUTE pidlFolder,
  [in] HKEY              hKey,
  [in] DWORD             dwFlags
);

Parameters

psf [in]

Type: IShellFolder*

A pointer to the folder's IShellFolder interface. This pointer can be NULL.

pidlFolder [in]

Type: PCIDLIST_ABSOLUTE

The folder's fully qualified ITEMIDLIST. This value can be NULL.

hKey [in]

Type: HKEY

An HKEY with an "Order" value that is used to store the order of the menu. This value can be NULL.

dwFlags [in]

Type: DWORD

Flags that specify how the menu band operates.

SMSET_BOTTOM

Put this folder at the bottom of the menu.

SMSET_USEBKICONEXTRACTION

Use the background icon extractor.

SMSET_HASEXPANDABLEFOLDERS

This folder contains expandable folders.

SMSET_COLLAPSEONEMPTY

Collapse the menu if empty.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Call this method after you call IShellMenu::Initialize.

Requirements

Minimum supported client

Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll

 

 

Show: