Home COM GDI+ WebBrowser Data Access 

Shell Objects For C++

 

FileOpen Object

 

The FileOpen object supports the File Open common dialog box.

 

Remarks

To create a FileOpen object and get a pointer to its IShellBrowser interface, call the QueryService method with the guidService parameter of QueryService set to SID_SCommDlgBrowser and the riid parameter of QueryService set to IID_IShellBrowser. You can then interact with the FileOpen object through its IShellBrowser interface.

Creation/Access Functions

QueryService

Interfaces Implemented

IShellBrowser

The IShellBrowser interface is exposed by Microsoft Windows Explorer and the Open File common dialog box to provide services for namespace extensions.

Object Information

Header

shlobj.h

CLSID

Not available

Minimum operating systems

Windows 2000

 

 

FileTypes Object

 

The FileTypes object creates the File Types page of the Folder Options property sheet that the user displays by clicking Folder Options on the Microsoft Windows Explorer Tools menu.

 

Remarks

Create this object by calling CoCreateInstance with a class identifier (CLSID) of CLSID_FileTypes and an interface identifier (IID) of IID_IShellPropSheetExt. You can then use the IShellPropSheetExt to interact with the property sheet page.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_FileTypes.

Interfaces Implemented

IShellPropSheetExt

The IShellPropSheetExt interface allows a property sheet handler to add or replace pages in the property sheet displayed for a file object.

Object Information

Header

shlobj.h

CLSID

CLSID_FileTypes

Minimum operating systems

Windows 2000

 

 

FolderItemsFDF Object

 

The FolderItemsFDF object represents a shell folder and all its children.

 

Remarks

Create this object by calling CoCreateInstance with a class id of CLSID_FolderItem and an IID of IID_IPersistFolder. Then initialize the shell folder object by calling IPersistFolder::Initialize with the root folder. You can then call QueryInterface to obtain pointers to other shell interfaces.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_FolderItemsFDF.

Interfaces Implemented

IPersistFolder

The IPersistFolder interface is used to initialize Shell folder objects.

IDispatch

The IDispatch interface exposes objects, methods and properties to programming tools and other applications that support Automation.

FolderItems3

The FolderItems3 object extends the FolderItems2 object. It supports an additional method and property.

IInsertItem

The IInsertItem interface provides a method that inserts an ITEMIDLIST structure into a list of such structures.

Object Information

Header

shlguid.h

CLSID

CLSID_FolderItemsFDF

Minimum operating systems

Windows 2000

 

 

Image Recompress Object

 

Used to recompress an image.

 

Remarks

Call CoCreateInstance, use the class identifier (CLSID) CLSID_ImageRecompress and IID_IImageRecompress as the REFIID to create a Image Recompress object.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_ImageRecompress.

Interfaces Implemented

IImageRecompress

IImageRecompress is used to provide an interface to recompress images.

Object Information

Minimum DLL Version

shimgvw.dll

Custom Implementation

No

Header

shobjidl.h

CLSID

CLSID_ImageRecompress

Minimum operating systems

Windows 2000

See Also

IImageRecompress

 

 

MenuBand Object

 

The MenuBand object supports shell menu bands.

 

Remarks

Create this object by calling CoCreateInstance with a class identifier of CLSID_MenuBand and an interface identifier (IID) of IID_IShellMenu. You can then interact with the object through IShellMenu.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_MenuBand.

Interfaces Implemented

IShellMenu

Object Information

Header

shlobj.h

CLSID

CLSID_MenuBand

Minimum operating systems

Windows 2000

 

 

MenuBandSite Object

 

Used to get or set menu band site information.

 

Remarks

Call CoCreateInstance, use the class identifier (CLSID) CLSID_MenuBandSite and IID_IBandSite as the REFIID to create a MenuBandSite object.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_MenuBandSite.

Interfaces Implemented

IBandSite

IBandSite is used to control band objects.

Object Information

Minimum DLL Version

shell32.dll

Custom Implementation

No

Header

shlguid.h

CLSID

CLSID_MenuBandSite

Minimum operating systems

Windows 2000

See Also

IBandSite

 

 

NewMenu Object

 

The NewMenu object creates a New context menu for a Shell item.

 

Remarks

The New context menu is the same menu that a user can display by right-clicking the Microsoft Windows desktop or Windows Explorer window, and selecting New from the drop-down list box.

 

Create this object by calling CoCreateInstance with a class identifier (CLSID) of CLSID_NewMenu and an interface identifier (IID) of IID_IShellExtInit. Because the New context menu is invoked in the context of a folder rather than a particular folder item, initialize the object by calling IShellExtInit::Initialize with the ITEMIDLIST of the parent folder. You can then call QueryInterface to obtain pointers to the other interfaces that the object exports.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_NewMenu.

Interfaces Implemented

IContextMenu

The IContextMenu interface is called by the Shell to either create or merge a shortcut menu associated with a Shell object.

IContextMenu2

IContextMenu2 interface is used to either create or merge a shortcut menu associated with a certain object when the menu involves owner-drawn menu items

IContextMenu3

The IContextMenu3 interface is used to create or merge a shortcut menu associated with a certain object when the menu implementation needs to process the WM_MENUCHAR message.

IShellExtInit

The IShellExtInit interface is used to initialize Shell extensions for property sheets, shortcut menus, and drag-and-drop handlers (extensions that add items to shortcut menus during nondefault drag-and-drop operations).

IObjectWithSite

The IObjectWithSite interface provides a simple way to support communication between an object and its site in the container.

Object Information

Header

shlobj.h

CLSID

CLSID_NewMenu

Minimum operating systems

Windows 2000

 

 

Shell Image Store Object

 

Creates an instance of an IShellImageStore object.

 

Remarks

The following example demonstrates how to obtain an IShellImageStore object and initialize it to the path you specify.

 

IPersistFolder *ppf;
HRESULT hr;
hr = CoCreateInstance(CLSID_ShellThumbnailDiskCache, NULL, CLSCTX_INPROC,
                      IID_IPersistFolder, &ppf);
if(SUCCEEDED(hr))
{
   //  pidl is the item that receives the object initialization.
   //  In other words, it is the cache you want to manipulate.
   hr = ppf -> Initialize(pidl);
   
   if (SUCCEEDED(hr))
   {
      IShellImageStore *psis;
      hr = ppf -> QueryInterface(IID_IShellImageStore, &psis);
      if(SUCCEEDED(hr))
      {	
         //  TODO: Add code to manipulate psis
      }
   }
   ppf -> Release();
}

 

If you have a path stored in pszFile instead of a pointer to an item identifier list (PIDL), you can call the following line.

hr = ppf->Load(pszFile, STGM_READ);

 

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_ShellThumbnailDiskCache.

Interfaces Implemented

IShellImageStore

The IShellImageStore interface manipulates the image cache.

Object Information

Minimum DLL Version

shell32.dll version 5.0 or later

Custom Implementation

No

Header

shlguid.h

CLSID

CLSID_ShellThumbnailDiskCache

Minimum operating systems

Windows 2000

 

 

ShellFldSetExt Object

 

The ShellFldSetExt object creates a Folder Options dialog box.

 

Remarks

The ShellFldSetExt dialog box is is the dialog box that appears when an end user chooses Tools and then Folder Options in Microsoft Windows Explorer.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_ShellFldSetExt.

Interfaces Implemented

IShellPropSheetExt

The IShellPropSheetExt interface allows a property sheet handler to add or replace pages in the property sheet displayed for a file object.

IShellExtInit

The IShellExtInit interface is used to initialize Shell extensions for property sheets, shortcut menus, and drag-and-drop handlers (extensions that add items to shortcut menus during non-default drag-and-drop operations).

IObjectWithSite

The IObjectWithSite interface provides a simple way to support communication between an object and its site in the container.

Object Information

Header

shlobj.h

CLSID

CLSID_ShellFldSetExt

Minimum operating systems

Windows 2000

 

 

ShellFolderBand Object

 

Manages folder bands. The Quick Launch bar is an example of a folder band.

 

Remarks

To create a ShellFolderBand object call CoCreateInstance and use the class identifier (ID) CLSID_ISFBand and IShellFolderBand as the REFIID.

Creation/Access Functions

CoCreateInstance

Call CoCreateInstance setting the CLSID parameter to CLSID_ISFBand.

Interfaces Implemented

IShellFolderBand

The IShellFolderBand interface is used to manage folder bands. The Quick Launch bar is an example of a folder band.

Object Information

Minimum DLL Version

shell32.dll

Custom Implementation

No

Header

shlguid.h

CLSID

CLSID_ISFBand

Minimum operating systems

Windows 2000

 

 

Page last updated on Saturday, 07 January 2006 15:43:48 +0100