Tree view styles govern aspects of a tree view control's appearance. You set the initial styles when you create the tree view control. You can retrieve and change the styles after creating the tree view control by using the GetWindowLong and SetWindowLong functions.
Tree view styles supported by Windows CE are described in the following table.
Style | Description |
---|---|
TVS_CHECKBOXES | Enables items in a tree view control to be displayed as check boxes. This style uses item state images to produce the check box effect. |
TVS_DISABLEDRAGDROP | Prevents the tree view control from sending TVN_BEGINDRAG notification messages. |
TVS_EDITLABELS | Allows the user to edit the labels of tree view items. |
TVS_HASBUTTONS | Displays plus (+) and minus (-) buttons next to parent items. The user clicks the buttons to expand or collapse a parent item's list of child items. To include buttons with items at the root of the tree view, you must also specify the TVS_LINESATROOT style. |
TVS_HASLINES | Uses lines to show the hierarchy of items. |
TVS_LINESATROOT | Uses lines to link items at the root of the tree view control. This value is ignored if TVS_HASLINES is not also specified. |
TVS_SHOWSELALWAYS | Uses the system highlight colors to draw the selected item. |
TVS_SINGLESEL | Specifies that when a new tree view item is selected, the selected item will automatically expand and the previously selected item will collapse. |