Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 2.94 KB

nf-commctrl-treeview_selectitem.md

File metadata and controls

73 lines (59 loc) · 2.94 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:commctrl.TreeView_SelectItem
TreeView_SelectItem macro (commctrl.h)
Selects the specified tree-view item. You can use this macro or the TreeView_Select macro, or you can send the TVM_SELECTITEM message explicitly.
TreeView_SelectItem
TreeView_SelectItem macro [Windows Controls]
_win32_TreeView_SelectItem
_win32_TreeView_SelectItem_cpp
commctrl/TreeView_SelectItem
controls.TreeView_SelectItem
controls._win32_TreeView_SelectItem
controls\TreeView_SelectItem.htm
Controls
VS|Controls|~\controls\treeview\macros\treeview_selectitem.htm
12/05/2018
TreeView_SelectItem, TreeView_SelectItem macro [Windows Controls], _win32_TreeView_SelectItem, _win32_TreeView_SelectItem_cpp, commctrl/TreeView_SelectItem, controls.TreeView_SelectItem, controls._win32_TreeView_SelectItem
commctrl.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
Windows
19H1
TreeView_SelectItem
commctrl/TreeView_SelectItem
c++
APIRef
kbSyntax
HeaderDef
Commctrl.h
TreeView_SelectItem

TreeView_SelectItem macro

-description

Selects the specified tree-view item. You can use this macro or the TreeView_Select macro, or you can send the TVM_SELECTITEM message explicitly.

-parameters

-param hwnd

Type: HWND

Handle to the tree-view control.

-param hitem

Type: HTREEITEM

Handle to an item. If the hitem parameter is NULL, the control is set to have no selected item.

-remarks

When you call the TreeView_SelectItem macro, the control's parent window receives the TVN_SELCHANGING and TVN_SELCHANGED notification codes. Also, if the specified item is the child of a collapsed parent item, the parent's list of child items is expanded to reveal the specified item. In this case, the parent window receives the TVN_ITEMEXPANDING and TVN_ITEMEXPANDED notification codes.

Using the TreeView_SelectItem macro is equivalent to sending the TVM_SELECTITEM message with its flag parameter set to the TVGN_CARET value.