TVN_SELCHANGED

The TVN_SELCHANGED notification message notifies a tree-view control's parent window that the selection has changed from one item to another. This notification message is sent in the form of a WM_NOTIFY message.

TVN_SELCHANGED

pnmtv = (NM_TREEVIEW FAR *) lParam

Parameters

pnmtv

Pointer to an NM_TREEVIEW structure. The itemOld and itemNew members of the NM_TREEVIEW structure are TV_ITEM structures that contain information about the previously selected item and the newly selected item. Only the mask, hItem, state, and lParam members of these structures are valid. The stateMask members of the TV_ITEM structures specified by itemOld and itemNew are undefined on input.

The action member of the NM_TREEVIEW structure indicates the type of action that caused the selection to change. It can be one of the following values:

Value Meaning
TVC_BYKEYBOARD By a key stroke
TVC_BYMOUSE By a mouse click
TVC_UNKNOWN Unknown

Return Values

No return value.

See Also

NM_TREEVIEW, WM_NOTIFY