JCL Help:TEnumFolderRec

From Project JEDI Wiki
Jump to navigationJump to search


Summary

The TEnumFolderRec is used to return information about an item that was found during the enumeration of a folder using the SHEnumFolderFirst and SHEnumFolderNext functions. It also holds data needed to perform the enumeration. Because of this you must always call SHEnumFolderClose to release these resources if SHEnumFolderFirst returned True.


Pascal

 public TEnumFolderRec = record
DisplayName: string;
Attributes: DWORD;
IconLarge: HICON;
IconSmall: HICON;
Item: PItemIdList;
EnumIdList: IEnumIdList;
Folder: IShellFolder;
end;


Members

Members Description
DisplayName: string; The display name of the item
Attributes: DWORD; Attributes of the item (see IShellFolder.GetAttributesOf)
IconLarge: HICON; The large icon
IconSmall: HICON; The small icon
Item: PItemIdList; Readonly! Item identifier list representing this item. Relative to Folder
EnumIdList: IEnumIdList; Don't touch! Interface used for enumeration.
Folder: IShellFolder; IShellFolder interface of the folder we are enumerating.


Description

The TEnumFolderRec is used to return information about an item that was found during the enumeration of a folder using the SHEnumFolderFirst and SHEnumFolderNext functions. It also holds data needed to perform the enumeration. Because of this you must always call SHEnumFolderClose to release these resources if SHEnumFolderFirst returned True.


About

Unit

JclShell


Navigation

Donator

Marcel van Brakel


Notes

The returned icons are the 'plain' icons. You can use code such as below to transform them into how the shell displays them:
if (F.Attributes and SFGAO_SHARE) = SFGAO_SHARE then OverlayIconShared(F.IconLarge, F.IconSmall); You can also use the Folder member to get additional info about the found item:
S := GetItemInfoTip(F.Folder, F.Item);


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page