TreeView_GetEditControl macro (commctrl.h)

Retrieves the handle to the edit control being used to edit a tree-view item's text. You can use this macro or send the TVM_GETEDITCONTROL message explicitly.

Syntax

HWND TreeView_GetEditControl(
   HWND hwnd
);

Parameters

hwnd

Type: HWND

Handle to the tree-view control.

Return value

Type: HWND

The handle to the edit control being used to edit a tree-view item's text, or NULL if no item is being edited.

Remarks

When label editing begins, an edit control is created but not positioned or displayed. Before it is displayed, the tree-view control sends its parent window a TVN_BEGINLABELEDIT notification code.

To customize label editing, implement a handler for TVN_BEGINLABELEDIT and have it use TreeView_GetEditControl to send a TVM_GETEDITCONTROL message to the tree-view control. If a label is being edited, the return value will be a handle to the edit control. Use this handle to customize the edit control by sending the usual EM_XXX messages.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h