
This section describes the Microsoft® Windows® shell structures and enumerations.
| Structures |
| APPBARDATA |
| BROWSEINFO |
| CIDA |
| CMINVOKECOMMANDINFO |
| DESKBANDINFO |
| FOLDERSETTINGS |
| FVSHOWINFO |
| ITEMIDLIST |
| NOTIFYICONDATA |
| SHDESCRIPTIONID |
| SHELLEXECUTEINFO |
| SHELLFLAGSTATE |
| SHFILEINFO |
| SHFILEOPSTRUCT |
| SHITEMID |
| SHNAMEMAPPING |
| SHQUERYRBINFO |
| STRRET |
| SV2CVW2_PARAMS (No documentation available at this time.) |
| Enumerations |
| FOLDERFLAGS |
| FOLDERVIEWMODE |
| SHCONTF |
| SHGNO |
The following structures are used with the shell programming elements.
typedef struct _AppBarData {
DWORD cbSize;
HWND hWnd;
UINT uCallbackMessage;
UINT uEdge;
RECT rc;
LPARAM lParam;
} APPBARDATA, *PAPPBARDATA;
Contains information about a system application bar message. This structure is used with the SHAppBarMessage function.
| ABE_BOTTOM | Bottom edge. |
| ABE_LEFT | Left edge. |
| ABE_RIGHT | Right edge. |
| ABE_TOP | Top edge. |
This member is used when sending the ABM_GETAUTOHIDEBAR, ABM_QUERYPOS, ABM_SETAUTOHIDEBAR, and ABM_SETPOS messages.
typedef struct _browseinfo {
HWND hwndOwner;
LPCITEMIDLIST pidlRoot;
LPSTR pszDisplayName;
LPCSTR lpszTitle;
UINT ulFlags;
BFFCALLBACK lpfn;
LPARAM lParam;
int iImage;
} BROWSEINFO, *PBROWSEINFO, *LPBROWSEINFO;
Contains parameters for the SHBrowseForFolder function and receives information about the folder selected by the user.
| BIF_BROWSEFORCOMPUTER | Only return computers. If the user selects anything other than a computer, the OK button is grayed. |
| BIF_BROWSEFORPRINTER | Only return printers. If the user selects anything other than a printer, the OK button is grayed. |
| BIF_BROWSEINCLUDEFILES | The browse dialog will display files as well as folders. |
| BIF_DONTGOBELOWDOMAIN | Do not include network folders below the domain level in the tree view control. |
| BIF_EDITBOX | Version 4.71. The browse dialog includes an edit control in which the user can type the name of an item. |
| BIF_RETURNFSANCESTORS | Only return file system ancestors. If the user selects anything other than a file system ancestor, the OK button is grayed. |
| BIF_RETURNONLYFSDIRS | Only return file system directories. If the user selects folders that are not part of the file system, the OK button is grayed. |
| BIF_STATUSTEXT | Include a status area in the dialog box. The callback function can set the status text by sending messages to the dialog box. |
| BIF_VALIDATE | Version 4.71. If the user types an invalid name into the edit box, the browse dialog will call the application's BrowseCallbackProc with the BFFM_VALIDATEFAILED message. This flag is ignored if BIF_EDITBOX is not specified. |
typedef struct _IDA {
UINT cidl;
UINT aoffset[1];
} CIDA, * LPIDA;
Contains one variable-sized element of an ITEMIDLIST. This structure is used with the "Shell IDList Array" clipboard format.
typedef struct _CMInvokeCommandInfo{
DWORD cbSize;
DWORD fMask;
HWND hwnd;
LPCSTR lpVerb;
LPCSTR lpParameters;
LPCSTR lpDirectory;
int nShow;
DWORD dwHotKey;
HANDLE hIcon;
} CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
Contains information about a context menu command.
| CMIC_MASK_HOTKEY | The dwHotKey member is valid. |
| CMIC_MASK_ICON | The hIcon member is valid. |
| CMIC_MASK_FLAG_NO_UI | The system is prevented from displaying user interface elements (for example, error messages) while carrying out a command. |
| Value | String |
| CMDSTR_NEWFOLDER | "NewFolder" |
| CMDSTR_VIEWDETAILS | "ViewDetails" |
| CMDSTR_VIEWLIST | "ViewList" |
The address of this structure is passed to the IContextMenu::InvokeCommand method.
typedef struct {
DWORD dwMask;
POINTL ptMinSize;
POINTL ptMaxSize;
POINTL ptIntegral;
POINTL ptActual;
WCHAR wszTitle[256];
DWORD dwModeFlags;
COLORREF crBkgnd;
} DESKBANDINFO;
Contains and receives information for a band object. This structure is used with the IDeskBand::GetBandInfo method.
| DBIM_MINSIZE | ptMinSize is being requested. |
| DBIM_MAXSIZE | ptMaxSize is being requested. |
| DBIM_INTEGRAL | ptIntegral is being requested. |
| DBIM_ACTUAL | ptActual is being requested. |
| DBIM_TITLE | wszTitle is being requested. |
| DBIM_MODEFLAGS | dwModeFlags is being requested. |
| DBIM_BKCOLOR | crBkgnd is being requested. |
| DBIMF_NORMAL | The band is normal in all respects. The other mode flags modify this flag. |
| DBIMF_VARIABLEHEIGHT | The height of the band object can be changed. The ptIntegral member defines the step value by which the band object can be resized. |
| DBIMF_DEBOSSED | The band object is displayed with a sunken appearance. |
| DBIMF_BKCOLOR | The band will be displayed with the background color specified in crBkgnd. |
Version 4.71
typedef struct {
UINT ViewMode;
UINT fFlags;
}FOLDERSETTINGS; *LPFOLDERSETTINGS;
Contains folder view information.
These settings assume a particular user interface, which the shell's folder view has. A shell extension can use these settings if they apply to the view implemented by the extension.
See also IShellView::CreateViewWindow, IShellView::GetCurrentInfo
typedef struct {
DWORD cbSize;
HWND hwndOwner;
int iShow;
DWORD dwFlags;
RECT rect;
LPUNKNOWN punkRel;
OLECHAR strNewFile[MAX_PATH];
} FVSHOWINFO, *LPFVSHOWINFO;
Contains information that the file viewer uses to display a file.
| FVSIF_CANVIEWIT | The file viewer can display the file. |
| FVSIF_NEWFAILED | The file viewer specified a new file to display, but no viewer could display the file. The file viewer should either continue to display the previous file or terminate. |
| FVSIF_NEWFILE | A drag-and-drop operation has dropped a file on the file viewer window. The file viewer passes the name of the file to the shell by copying the name to the strNewFile member. The shell attempts to load a file viewer that can display the new file. |
| FVSIF_PINNED | A pinned window exists. A file viewer should either use the pinned window to display the file or set a new pinned window and display the file in it. |
| FVSIF_RECT | The rect member contains valid data. |
typedef struct _ITEMIDLIST {
SHITEMID mkid;
} ITEMIDLIST, * LPITEMIDLIST;
typedef const ITEMIDLIST * LPCITEMIDLIST;
Contains a list of item identifiers.
typedef struct _NOTIFYICONDATA {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
char szTip[64];
} NOTIFYICONDATA, *PNOTIFYICONDATA;
Contains information that the system needs to process taskbar status area messages.
| NIF_ICON | The hIcon member is valid. |
| NIF_MESSAGE | The uCallbackMessage member is valid. |
| NIF_TIP | The szTip member is valid. |
typedef struct SHDESCRIPTIONID{
DWORD dwDescriptionId;
CLSID clsid;
} SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
Receives item data in response to a call to SHGetDataFromIDList.
| SHDID_ROOT_REGITEM | The item is a registered item on the desktop. |
| SHDID_FS_FILE | The item is a file. |
| SHDID_FS_DIRECTORY | The item is a folder. |
| SHDID_FS_OTHER | The item is an unidentified item in the file system. |
| SHDID_COMPUTER_DRIVE35 | The item is a 3.5-inch floppy drive. |
| SHDID_COMPUTER_DRIVE525 | The item is a 5.25-inch floppy drive. |
| SHDID_COMPUTER_REMOVABLE | The item is a removable disk drive. |
| SHDID_COMPUTER_FIXED | The item is a fixed disk drive. |
| SHDID_COMPUTER_NETDRIVE | The item is a drive that is mapped to a network share. |
| SHDID_COMPUTER_CDROM | The item is a CD-ROM drive. |
| SHDID_COMPUTER_RAMDISK | The item is a RAM disk. |
| SHDID_COMPUTER_OTHER | The item is an unidentified system device. |
| SHDID_NET_DOMAIN | The item is a network domain. |
| SHDID_NET_SERVER | The item is a network server. |
| SHDID_NET_SHARE | The item is a network share. |
| SHDID_NET_RESTOFNET | Not currently used. |
| SHDID_NET_OTHER | The item is an unidentified network resource. |
typedef struct _SHELLEXECUTEINFO{
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCTSTR lpVerb;
LPCTSTR lpFile;
LPCTSTR lpParameters;
LPCTSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
// Optional members
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
HANDLE hIcon;
HANDLE hProcess;
} SHELLEXECUTEINFO, FAR *LPSHELLEXECUTEINFO;
Contains information used by the ShellExecuteEx function.
| SEE_MASK_CLASSKEY | Use the class key given by the hkeyClass member. |
| SEE_MASK_CLASSNAME | Use the class name given by the lpClass member. |
| SEE_MASK_CONNECTNETDRV | Validate the share and connect to a drive letter. The lpFile member is a Universal Naming Convention (UNC) path of a file on a network. |
| SEE_MASK_DOENVSUBST | Expand any environment variables specified in the string given by the lpDirectory or lpFile member. |
| SEE_MASK_FLAG_DDEWAIT | Wait for the DDE conversation to terminate before returning (if the ShellExecuteEx function causes a DDE conversation to start). |
| SEE_MASK_FLAG_NO_UI | Do not display an error message box if an error occurs. |
| SEE_MASK_HOTKEY | Use the hot key given by the dwHotKey member. |
| SEE_MASK_ICON | Use the icon given by the hIcon member. |
| SEE_MASK_IDLIST | Use the item identifier list given by the lpIDList member. |
| SEE_MASK_INVOKEIDLIST | Use the item identifier list given by the lpIDList member to invoke an application. If this member is NULL, the function creates an item identifier list and invokes the application. This flag overrides the SEE_MASK_IDLIST flag. |
| SEE_MASK_NOCLOSEPROCESS | Leave the process running after the ShellExecuteEx function exits. The hProcess member receives the handle to the process. |
sei.lpParameters = "An example: \"\"\"quoted text\"\"\"";
In this case, the application receives three parameters: An, example:, and "quoted text".
If the lpFile member specifies a document file, this member should be NULL.
| SE_ERR_FNF | File not found. |
| SE_ERR_PNF | Path not found. |
| SE_ERR_ACCESSDENIED | Access denied. |
| SE_ERR_OOM | Out of memory. |
| SE_ERR_DLLNOTFOUND | Dynamic-link library not found. |
| SE_ERR_SHARE | Cannot share an open file. |
| SE_ERR_ASSOCINCOMPLETE | File association information not complete. |
| SE_ERR_DDETIMEOUT | DDE operation timed out. |
| SE_ERR_DDEFAIL | DDE operation failed. |
| SE_ERR_DDEBUSY | DDE operation is busy. |
| SE_ERR_NOASSOC | File association not available. |
typedef struct {
BOOL fShowAllObjects : 1;
BOOL fShowExtensions : 1;
BOOL fNoConfirmRecycle : 1;
BOOL fShowSysFiles : 1;
BOOL fShowCompColor : 1;
BOOL fDoubleClickInWebView : 1;
BOOL fDesktopHTML : 1;
BOOL fWin95Classic : 1;
BOOL fDontPrettyPath : 1;
BOOL fShowAttribCol : 1;
BOOL fMapNetDrvBtn : 1;
BOOL fShowInfoTip : 1;
BOOL fHideIcons : 1;
UINT fRestFlags : 3;
} SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
Contains a set of flags that indicate the current shell settings. This structure is used with the SHGetSettings function.
Version 4.71
typedef struct _SHFILEINFO{
HICON hIcon;
int iIcon;
DWORD dwAttributes;
char szDisplayName[MAX_PATH];
char szTypeName[80];
} SHFILEINFO;
Contains information about a file object.
This structure is used with the SHGetFileInfo function.
typedef struct _SHFILEOPSTRUCT{
HWND hwnd;
UINT wFunc;
LPCSTR pFrom;
LPCSTR pTo;
FILEOP_FLAGS fFlags;
BOOL fAnyOperationsAborted;
LPVOID hNameMappings;
LPCSTR lpszProgressTitle;
} SHFILEOPSTRUCT, FAR *LPSHFILEOPSTRUCT;
Contains information that the SHFileOperation function uses to perform file operations.
| FO_COPY | Copies the files specified in the pFrom member to the location specified in the pTo member. |
| FO_DELET | Deletes the files specified in pFrom. (pTo is ignored.) |
| FO_MOVE | Moves the files specified in pFrom to the location specified in pTo. |
| FO_RENAME | Renames the files specified in pFrom. |
| FOF_ALLOWUNDO | Preserve Undo information, if possible. |
| FOF_CONFIRMMOUSE | Not currently implemented. |
| FOF_FILESONLY | Perform the operation on files only if a wildcard file name (*.*) is specified. |
| FOF_MULTIDESTFILES | The pTo member specifies multiple destination files (one for each source file) rather than one directory where all source files are to be deposited. |
| FOF_NOCONFIRMATION | Respond with Yes to All for any dialog box that is displayed. |
| FOF_NOCONFIRMMKDIR | Does not confirm the creation of a new directory if the operation requires one to be created. |
| FOF_NOCOPYSECURITYATTRIBS | Version 4.71. Microsoft® Windows NT® only. The security attributes of the file will not be copied. |
| FOF_NOERRORUI | No user interface will be displayed if an error occurs. |
| FOF_RENAMEONCOLLISION | Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists. |
| FOF_SILENT | Does not display a progress dialog box. |
| FOF_SIMPLEPROGRESS | Displays a progress dialog box but does not show the file names. |
| FOF_WANTMAPPINGHANDLE | If FOF_RENAMEONCOLLISION is specified, the hNameMappings member will be filled in if any files were renamed. |
If the pFrom or pTo members are unqualified names, the current directories are taken from the global current drive and directory settings as managed by the GetCurrentDirectory and SetCurrentDirectory functions.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.