Rediger

Del via


IShellFolderViewType interface

Exposes methods that enable a Shell folder to support different views on its content (different hierarchical layouts of its data).

Members

The IShellFolderViewType interface inherits from the IUnknown interface. IShellFolderViewType also has these types of members:

Methods

The IShellFolderViewType interface has these methods.

Method Description
EnumViews Retrieves an enumerator that will return one PIDL for every extended view.
GetDefaultViewName Gets the name of the default view. Call IShellFolder::GetDisplayNameOf to retrieve the names of the other views.
GetViewTypeProperties Gets the properties of the view.
TranslateViewPidl Reconstructs a PIDL from one hierarchical representation of the Shell folder into a different representation.

 

Remarks

This enumerator returns PIDLs that are special hidden folders at the top level of the Shell folder, which are not otherwise enumerated. The default view is the one the Shell folder displays normally.

This interface is not defined in any public header file. Should you choose to implement this interface, you can use the following C/C++ code to declare its methods.

#undef  INTERFACE
#define INTERFACE   IShellFolderViewType
DECLARE_INTERFACE_IID_(IShellFolderViewType, IUnknown, "49422C1E-1C03-11d2-8DAB-0000F87A556C")
{
    // *** IUnknown methods ***
    STDMETHOD(QueryInterface) (THIS_ REFIID riid, __out void **ppv) PURE;
    STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
    STDMETHOD_(ULONG,Release) (THIS) PURE;

    // *** IShellFolderViewType Methods ***

    // EnumViews:
    //   Returns an enumerator which will give out one pidl for every extended view.
    STDMETHOD(EnumViews)(THIS_ ULONG grfFlags, __out IEnumIDList **ppenum) PURE;

    // GetDefaultViewName:
    //   Returns the name of the default view.  The names of the other views
    //   can be retrieved by calling GetDisplayNameOf.
    STDMETHOD(GetDefaultViewName)(THIS_ DWORD  uFlags, __out LPWSTR *ppwszName) PURE;
    STDMETHOD(GetViewTypeProperties)(THIS_ PCUITEMID_CHILD pidl, __out DWORD *pdwFlags)  PURE;

    // TranslateViewPidl:
    //   Attempts to take a pidl represented in one hierarchical representation of
    //   the Shell folder, and find it in a different representation.
    //   pidl should be relative to the root folder.
    //   Remember to ILFree ppidlOut
    STDMETHOD(TranslateViewPidl)(THIS_ PCUIDLIST_RELATIVE pidl, PCUIDLIST_RELATIVE pidlView,
              __out PIDLIST_RELATIVE *ppidlOut) PURE;
};

#define SFVTFLAG_NOTIFY_CREATE  0x00000001
#define SFVTFLAG_NOTIFY_RESORT  0x00000002

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
DLL
Shell32.dll