TreeView_Expand (Windows CE 5.0)
This macro expands or collapses the list of child items, if any, associated with the specified parent item. You can use this macro or send the TVM_EXPAND message explicitly.
BOOLTreeView_Expand(hwnd,hitem,flag );
Parameters
- hwnd
Handle to a tree view control. - hitem
Handle to the parent item that will be expanded or collapsed. - flag
Action flag. For a list of possible values, see the description of the flag parameter in TVM_EXPAND.Value Description TVE_EXPANDPARTIAL Child items are visible and parent item's plus symbol is displayed. This flag must be used in combination with the TVE_EXPAND flag.
Return Values
Nonzero indicates that a change took place. Zero indicates otherwise.
Remarks
The TreeView_Expand macro causes the TVN_ITEMEXPANDING and TVN_ITEMEXPANDED messages to be generated if the item being expanded does not have the TVIS_EXPANDEDONCE state bit set. This state gets set when a parent item is expanded for the first time. Using TVE_COLLAPSE and TVE_COLLAPSERESET with TreeView_Expand will cause the TVIS_EXPANDEDONCE state to be reset.
If the item already has the TVIS_EXPANDEDONCE state set, the TreeView_Expand macro does not cause the TVN_ITEMEXPANDING and TVN_ITEMEXPANDED messages to be generated.
Requirements
OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.
See Also
TVM_EXPAND | TVN_ITEMEXPANDED | TVN_ITEMEXPANDING
Send Feedback on this topic to the authors