BCGControlBar Pro for MFC
void CBCGPShellTree::SetFlags ( DWORD  dwFlags,
BOOL  bRefresh = TRUE 
)

Set shell tree flags

Allows to set flags to filter out the tree context similar to IShellFolder::EnumObjects.

CBCGPShellTree calls internally IShellFolder::EnumObjects. Using the SetFlags method, you can specify the flags to be passed to EnumObjects.

You can use the following flags:

  • 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.
  • SHCONTF_INIT_ON_FIRST_NEXT: IShellFolder::EnumObjects can return without validating the enumeration object. Validation can be postponed until the first call to IEnumIDList::Next. Use this flag when a user interface might be displayed prior to the first IEnumIDList::Next call. For a user interface to be presented, hwndOwner must be set to a valid window handle.
  • SHCONTF_NETPRINTERSRCH: The caller is looking for printer objects.
  • SHCONTF_SHAREABLE: The caller is looking for remote shares.
  • SHCONTF_STORAGE: Include items with accessible storage and their ancestors.

Initially, CBCGPShellTree objects are created with the flags set to SHCONTF_FOLDERS.

Parameters
dwFlagsSpecifies the flags.
bRefreshIndicates whether the shell tree control should be refreshed immediately (TRUE) or not.