Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message notifies a tree view control's parent window that the selection has changed from one item to another. It is sent in the form of a WM_NOTIFYmessage.

Syntax

TVN_SELCHANGED 
pnmtv = (NM_TREEVIEW FAR *) 
lParam

Parameters

pnmtv

Pointer to an NM_TREEVIEWstructure. The itemOldand itemNewmembers of the NM_TREEVIEWstructure are TVITEMstructures that contain information about the previously selected item and the newly selected item. Only the mask, hItem, state , and lParammembers of these structures are valid. The stateMaskmembers of the TVITEMstructures specified by itemOldand itemNeware undefined on input.

The actionmember of the NM_TREEVIEWstructure indicates the type of action that caused the selection to change. It is one of the following values.

Value Description

TVC_BYKEYBOARD

By a keystroke.

TVC_BYMOUSE

By a mouse click.

TVC_UNKNOWN

Unknown.

Return Value

The return value is ignored.

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also