TVN_SELCHANGED notification code

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

TVN_SELCHANGED 

    pnmtv = (LPNMTREEVIEW) lParam 

Parameters

lParam

Pointer to an NMTREEVIEW structure. The itemOld and itemNew members of the NMTREEVIEW structure are TVITEM 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 TVITEM structures specified by itemOld and itemNew are undefined on input. The action member of the NMTREEVIEW structure indicates the type of action that caused the selection to change. It can be one of the following values:

Requirement Value
TVC_BYKEYBOARD By a keystroke.
TVC_BYMOUSE By a mouse click.
TVC_UNKNOWN Unknown.

Return value

The return value is ignored.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h
Unicode and ANSI names
TVN_SELCHANGEDW (Unicode) and TVN_SELCHANGEDA (ANSI)