This topic has not yet been rated - Rate this topic

NSTCSTYLE enumeration

Applies to: desktop apps only

Describes the characteristics of a given namespace tree control.

Syntax

typedef enum _NSTCSTYLE {
  NSTCS_HASEXPANDOS           = 0x00000001,
  NSTCS_HASLINES              = 0x00000002,
  NSTCS_SINGLECLICKEXPAND     = 0x00000004,
  NSTCS_FULLROWSELECT         = 0x00000008,
  NSTCS_SPRINGEXPAND          = 0x00000010,
  NSTCS_HORIZONTALSCROLL      = 0x00000020,
  NSTCS_ROOTHASEXPANDO        = 0x00000040,
  NSTCS_SHOWSELECTIONALWAYS   = 0x00000080,
  NSTCS_NOINFOTIP             = 0x00000200,
  NSTCS_EVENHEIGHT            = 0x00000400,
  NSTCS_NOREPLACEOPEN         = 0x00000800,
  NSTCS_DISABLEDRAGDROP       = 0x00001000,
  NSTCS_NOORDERSTREAM         = 0x00002000,
  NSTCS_RICHTOOLTIP           = 0x00004000,
  NSTCS_BORDER                = 0x00008000,
  NSTCS_NOEDITLABELS          = 0x00010000,
  NSTCS_TABSTOP               = 0x00020000,
  NSTCS_FAVORITESMODE         = 0x00080000,
  NSTCS_AUTOHSCROLL           = 0x00100000,
  NSTCS_FADEINOUTEXPANDOS     = 0x00200000,
  NSTCS_EMPTYTEXT             = 0x00400000,
  NSTCS_CHECKBOXES            = 0x00800000,
  NSTCS_PARTIALCHECKBOXES     = 0x01000000,
  NSTCS_EXCLUSIONCHECKBOXES   = 0x02000000,
  NSTCS_DIMMEDCHECKBOXES      = 0x04000000,
  NSTCS_NOINDENTCHECKS        = 0x08000000,
  NSTCS_ALLOWJUNCTIONS        = 0x10000000,
  NSTCS_SHOWTABSBUTTON        = 0x20000000,
  NSTCS_SHOWDELETEBUTTON      = 0x40000000,
  NSTCS_SHOWREFRESHBUTTON     = (int)0x80000000 
} NSTCSTYLE;

Constants

NSTCS_HASEXPANDOS

The control displays a triangle—known as an expando—on the leftmost edge of those items that have child items. Clicking on the expando expands the item to reveal the children of the item.

NSTCS_HASLINES

The control draws lines to the left of the tree items that lead to their individual parent items.

NSTCS_SINGLECLICKEXPAND

An item expands to show its child items in response to a single mouse click.

NSTCS_FULLROWSELECT

The selection of an item fills the row with inverse text to the end of the window area, regardless of the length of the text. When this option is not declared, only the area behind text is inverted.

NSTCS_SPRINGEXPAND

When one item is selected and expanded and you select a second item, the first selection automatically collapses.

NSTCS_HORIZONTALSCROLL

The area of the window that contains the tree of namespace items has a horizontal scroll bar.

NSTCS_ROOTHASEXPANDO

The root item is preceded by an expando that allows expansion of the root item.

NSTCS_SHOWSELECTIONALWAYS

The node of an item is outlined when the control does not have the focus.

NSTCS_NOINFOTIP

Do not display infotips when the mouse cursor is over an item.

NSTCS_EVENHEIGHT

Sets the height of the items to an even height. By default, the height of items can be even or odd.

NSTCS_NOREPLACEOPEN

Do not replace the Open command in the shortcut menu with a user-defined function.

NSTCS_DISABLEDRAGDROP

Do not allow drag-and-drop operations within the control. Note that you can still drag an item from outside of the control and drop it onto the control.

NSTCS_NOORDERSTREAM

Do not persist reordering changes. Used with NSTCS_FAVORITESMODE. If favorites mode is not specified, this flag has no effect.

NSTCS_RICHTOOLTIP

In the item's tooltip, draw the icon that corresponds to the control as well as the text. A standard tooltip draws only the text.

NSTCS_BORDER

Draw a thin border around the control. Corresponds to WS_BORDER.

NSTCS_NOEDITLABELS

Do not allow creation of an in-place edit box, which would allow the user to rename the given item.

NSTCS_TABSTOP

If the control is hosted, you can tabstop into the control. Corresponds to WS_EX_CONTROLPARENT.

NSTCS_FAVORITESMODE

The control has the appearance of the favorites band in Windows XP.

NSTCS_AUTOHSCROLL

When you hover the mouse pointer over an item that extends past the end of the control window, the control automatically scrolls horizontally so that the item appears more fully in the window area.

NSTCS_FADEINOUTEXPANDOS

If the control does not have the focus and there are items that are preceded by expandos, then these expandos are visible only when the mouse pointer is near to the control.

NSTCS_EMPTYTEXT

If an item has no children and is not expanded, then that item contains a line of text at the child level that says "empty".

NSTCS_CHECKBOXES

Items have check boxes on their leftmost side. These check boxes can be of types partial, exclusion or dimmed, which correspond to the flags NSTCS_PARTIALCHECKBOXES, NSTCS_EXCLUSIONCHECKBOXES, and NSTCS_DIMMEDCHECKBOXES.

NSTCS_PARTIALCHECKBOXES

Adds a checkbox icon on the leftmost side of a given item with a square in the center, that indicates that the node is partially selected. Must be combined with NSTCS_CHECKBOXES.

NSTCS_EXCLUSIONCHECKBOXES

Adds a checkbox icon on the leftmost side of a given item that contains a red X, which indicates that the item is excluded from the current selection. Without this exclusion icon, selection of a parent item includes selection of its child items. Must be combined with NSTCS_CHECKBOXES.

NSTCS_DIMMEDCHECKBOXES

Adds a checkbox on the leftmost side of a given item that contains an icon of a dimmed check mark, that indicates that a node is selected because its parent is selected. Must be combined with NSTCS_CHECKBOXES.

NSTCS_NOINDENTCHECKS

Check boxes are located at the far left edge of the window area instead of being indented.

NSTCS_ALLOWJUNCTIONS

Allow junctions. A junction point, or just junction, is a root of a namespace extension that is normally displayed by Windows Explorer as a folder in both tree and folder views. For Windows Explorer to display your extension's files and subfolders, you must specify where the root folder is located in the Shell namespace hierarchy.

Junctions exist in the file system as files, but are not treated as files. An example is a compressed file with a .zip file name extension, which to the file system is just a file. However, if this file is treated as a junction, it can represent an entire namespace. This allows the namespace tree control to treat compressed files and similar junctions as folders rather than as files.

NSTCS_SHOWTABSBUTTON

Displays an arrow on the right side of an item if the item is a folder. The action associated with the arrow is implementation specific.

NSTCS_SHOWDELETEBUTTON

Displays a red X on the right side of an item. The action associated with the X is implementation specific.

NSTCS_SHOWREFRESHBUTTON

Displays a refresh button on the right side of an item. The action associated with the button is implementation specific.

Remarks

These values are defined in the Shobjidl.h file.

Three values have effect only in conjunction with NSTCS_CHECKBOXES: NSTCS_PARTIALCHECKBOXES, NSTCS_EXCLUSIONCHECKBOXES, and NSTCS_DIMMEDCHECKBOXES. The icons associated with these states are inserted into the state image list as follows:

Image SlotImageAssociated Flags
0BlankNSTCS_CHECKBOXES
1UncheckedNSTCS_CHECKBOXES
2CheckedNSTCS_CHECKBOXES
3PartialNSTCS_CHECKBOXES | NSTCS_PARTIALCHECKBOXES
4Exclusion (red X)NSTCS_CHECKBOXES | NSTCS_EXCLUSIONCHECKBOXES

 

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

INameSpaceTreeControl::Initialize
INameSpaceTreeControl2::GetControlStyle
INameSpaceTreeControl2::SetControlStyle

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ