NSTCSTYLE enumeration

Describes the characteristics of a given namespace tree control.


typedef enum _NSTCSTYLE { 
  NSTCS_HASEXPANDOS          = 0x00000001,
  NSTCS_HASLINES             = 0x00000002,
  NSTCS_FULLROWSELECT        = 0x00000008,
  NSTCS_SPRINGEXPAND         = 0x00000010,
  NSTCS_HORIZONTALSCROLL     = 0x00000020,
  NSTCS_ROOTHASEXPANDO       = 0x00000040,
  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_EMPTYTEXT            = 0x00400000,
  NSTCS_CHECKBOXES           = 0x00800000,
  NSTCS_DIMMEDCHECKBOXES     = 0x04000000,
  NSTCS_NOINDENTCHECKS       = 0x08000000,
  NSTCS_ALLOWJUNCTIONS       = 0x10000000,
  NSTCS_SHOWTABSBUTTON       = 0x20000000,
  NSTCS_SHOWDELETEBUTTON     = 0x40000000,
  NSTCS_SHOWREFRESHBUTTON    = (int)0x80000000



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. Has no effect when combined with NSTCS_SHOWTABSBUTTON, NSTCS_SHOWDELETEBUTTON, or NSTCS_SHOWREFRESHBUTTON.

Maps to the TVS_HASBUTTONS tree view control style.


The control draws lines to the left of the tree items that lead to their individual parent items. Has no effect when combined with NSTCS_SHOWTABSBUTTON, NSTCS_SHOWDELETEBUTTON, or NSTCS_SHOWREFRESHBUTTON.

Maps to the TVS_HASLINES tree view control style.


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

Maps to the TVS_SINGLEEXPAND tree view control style.


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. This value cannot be combined with NSTCS_HASLINES.

Maps to the TVS_FULLROWSELECT tree view control style.


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

This is the opposite of the TVS_EX_NOSINGLECOLLAPSE tree view control style.


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

Maps to the WS_HSCROLL Windows style.


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

Maps to the TVS_LINESATROOT tree view control style.


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

Maps to the TVS_SHOWSELALWAYS tree view control style.


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

This is the opposite of the TVS_INFOTIP tree view control style.


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

This is the opposite of the TVS_NONEVENHEIGHT tree view control style.


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


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.

Maps to the TVS_DISABLEDRAGDROP tree view control style.


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


Use a rich tooltip. Rich tooltips display the item's icon in addition to the item's text. A standard tooltip displays only the item's text. The tree view displays tooltips only for items in the tree that are partially visible.

Maps to the TVS_EX_RICHTOOLTIP tree view control style.

NSTCS_RICHTOOLTIP has no effect unless it is combined with NSTCS_NOINFOTIP and/or NSTCS_FAVORITESMODE. If NSTCS_NOINFOTIP is not specified, the tree view displays an infotip instead of a tooltip. If NSTCS_FAVORITESMODE is not specified, the namespace tree control always sets the TVS_EX_RICHTOOLTIP style.


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


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

This is the opposite of the TVS_EDITLABELS tree view control style.


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


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


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.

Maps to the TVS_EX_AUTOHSCROLL tree view control style.


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.

Maps to the TVS_EX_FADEINOUTEXPANDOS tree view control style.


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".


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.

Maps to the TVS_CHECKBOXES tree view control style.


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.

Maps to the TVS_EX_PARTIALCHECKBOXES tree view control style.


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.

Maps to the TVS_EX_EXCLUSIONCHECKBOXES tree view control style.


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.

Maps to the TVS_EX_DIMMEDCHECKBOXES tree view control style.


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

Maps to the TVS_EX_NOINDENTSTATE tree view control style.


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.


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. Cannot be combined with NSTCS_SHOWDELETEBUTTON or NSTCS_SHOWREFRESHBUTTON.


Displays a red X on the right side of an item. The action associated with the X is implementation specific. Cannot be combined with NSTCS_SHOWTABSBUTTON or NSTCS_SHOWREFRESHBUTTON.


Displays a refresh button on the right side of an item. The action associated with the button is implementation specific. Cannot be combined with NSTCS_SHOWTABSBUTTON or NSTCS_SHOWDELETEBUTTON.


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



Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]





See also