SHITEMID
Structures and Enumerations

SHITEMID


typedef struct _SHITEMID { 
    USHORT cb; 
    BYTE   abID[1]; 
} SHITEMID, * LPSHITEMID; 
typedef const SHITEMID  * LPCSHITEMID; 

Defines an item identifier.

cb
Size of identifier, in bytes, including cb itself.
abID
Variable-length item identifier.

SHNAMEMAPPING

typedef struct _SHNAMEMAPPING { 
    LPSTR pszOldPath; 
    LPSTR pszNewPath; 
    int   cchOldPath; 
    int   cchNewPath; 
} SHNAMEMAPPING, FAR *LPSHNAMEMAPPING; 

Contains the old and new path names for each file that was moved, copied, or renamed by the SHFileOperation function.

pszOldPath
Address of a character buffer that contains the old path name.
pszNewPath
Address of a character buffer that contains the new path name.
cchOldPath
Number of characters in pszOldPath.
cchNewPath
Number of characters in pszNewPath.

See also SHFILEOPSTRUCT

SHQUERYRBINFO

typedef struct _SHQUERYRBINFO {
    DWORD cbSize;     
    __int64 i64Size;
    __int64 i64NumItems;
} SHQUERYRBINFO, FAR *LPSHQUERYRBINFO;

Contains the size and item count information retrieved by the SHQueryRecycleBin function.

cbSize
Size of the structure, in bytes. This member must be filled in prior to calling the function.
i64Size
Total size of all the objects in the specified Recycle Bin, in bytes.
i64NumItems
Total number of items in the specified Recycle Bin.

STRRET

typedef struct _STRRET {
   UINT uType; 
   union 
   { 
      LPWSTR pOleStr;
      LPSTR pStr;
      UINT uOffset;
      char cStr[MAX_PATH];
   } DUMMYUNIONNAME; 
} STRRET, *LPSTRRET; 

Contains strings returned from the IShellFolder interface methods.

uType
Value that specifies the desired format of the string. This can be one of the following values:
STRRET_CSTR String is returned in the cStr member.
STRRET_OFFSET The uOffset member value indicates the number of bytes from the beginning of the item identifier list where the string is located.
STRRET_WSTR String is at the address pointed to in the pOleStr member.
pOleStr
Address of the OLE string. This memory must be allocated with the shell's allocator (see SHGetMalloc). It is the calling application's responsibility to free this memory when it is no longer needed. The shell's allocator must be used to free the memory.
pStr
This member is not used.
uOffset
Offset into item identifier list.
cStr
Buffer to receive the display name.

See also IShellFolder::GetDisplayNameOf

Shell Enumerations

The following enumerations are used with the shell programming elements.

FOLDERFLAGS

typedef enum{
    FWF_AUTOARRANGE         = 0x0001,
    FWF_ABBREVIATEDNAMES    = 0x0002,
    FWF_SNAPTOGRID          = 0x0004,
    FWF_OWNERDATA           = 0x0008,
    FWF_BESTFITWINDOW       = 0x0010,
    FWF_DESKTOP             = 0x0020,
    FWF_SINGLESEL           = 0x0040,
    FWF_NOSUBFOLDERS        = 0x0080,
    FWF_TRANSPARENT         = 0x0100,
    FWF_NOCLIENTEDGE        = 0x0200,
    FWF_NOSCROLL            = 0x0400,
    FWF_ALIGNLEFT           = 0x0800,
    FWF_NOICONS             = 0x1000,
    FWF_SINGLECLICKACTIVATE = 0x8000
} FOLDERFLAGS;

Set of flags used to specify folder view options.

FWF_AUTOARRANGE
Automatically arrange the elements in the view. This implies LVS_AUTOARRANGE if the list view control is used to implement the view.
FWF_ABBREVIATEDNAMES
Names should be abbreviated. This flag is not currently supported.
FWF_SNAPTOGRID
Items should be arranged on a grid. This flag is not currently supported.
FWF_OWNERDATA
This flag is not currently supported.
FWF_BESTFITWINDOW
Enable the best-fit window mode. Let the view size the window so that its contents fit inside the view window in the best possible manner.
FWF_DESKTOP
Make the folder behave like the desktop. This value applies only to the desktop view and is not used for typical shell folders.
FWF_SINGLESEL
Do not allow more than a single item to be selected. This is used in the common dialogs.
FWF_NOSUBFOLDERS
Do not show subfolders.
FWF_TRANSPARENT
Draw transparently. This is used only for the desktop.
FWF_NOCLIENTEDGE
Do not add the WS_EX_CLIENTEDGE value to the view. This is used only for the desktop.
FWF_NOSCROLL
Do not add scroll bars. This is used only for the desktop.
FWF_ALIGNLEFT
The view should be left-aligned. This implies LVS_ALIGNLEFT if the list view control is used to implement the view.
FWF_NOICONS
The view should not display icons.
FWF_SINGLECLICKACTIVATE
This flag is not currently supported.

FOLDERVIEWMODE

typedef enum {
    FVM_ICON      = 1,
    FVM_SMALLICON = 2,
    FVM_LIST      = 3,
    FVM_DETAILS   = 4
} FOLDERVIEWMODE;

Set of constants used to specify the folder view type.

FVM_ICON
The view should display large icons.
FVM_SMALLICON
The view should display small icons.
FVM_LIST
Object names are displayed in a list view.
FVM_DETAILS
Object names and other selected information, such as the size or date last updated, are shown.

SHCONTF

typedef enum tagSHCONTF{  
    SHCONTF_FOLDERS = 32,
    SHCONTF_NONFOLDERS = 64,
    SHCONTF_INCLUDEHIDDEN = 128,
} SHCONTF; 

Determines the type of items included in an enumeration. These values are used with the IShellFolder::EnumObjects method.

SHCONTF_FOLDERS
Include items that are folders in the enumeration.
SHCONTF_NONFOLDERS
Include items that are not folders in the enumeration.
SHCONTF_INCLUDEHIDDEN
Include hidden items in the enumeration.

SHGNO

typedef enum tagSHGDN {  
    SHGDN_NORMAL = 0, 
    SHGDN_INFOLDER = 1, 
    SHGDN_INCLUDE_NONFILESYS = 0x2000, 
    SHGDN_FORADDRESSBAR = 0x4000, 
    SHGDN_FORPARSING = 0x8000, 
} SHGNO; 

Defines the values used with the IShellFolder::GetDisplayNameOf and IShellFolder::SetNameOf methods.

This enumeration consists of two sets of values. The first set is contained in bits 0 through 7 and specifies if the name is relative to this folder or if the name is a full name. The following are valid values in this set:

SHGDN_NORMAL Name is a full name. That is, the name is relative to the desktop and not to any specific folder.
SHGDN_INFOLDER Name is relative to the folder that is processing the name.

The second set of values is contained in bits 8 through 15. These values are modifiers to the first set and specify the name retrieval options. The following are valid values in this set:

SHGDN_NORMAL Name will be used for generic display.
SHGDN_FORADDRESSBAR Name will be used for display in the address bar combo box.
SHGDN_FORPARSING Name will be used for parsing. That is, it can be passed to ParseDisplayName.
SHGDN_INCLUDE_NONFILESYS If this flag is set, the calling application is interested in names of any types of items. If this flag is not set, the calling application is only interested in items that are part of the file system. If this flag is not set and the item is not part of the file system, this method should fail.

See also Display Names

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.