The TVM_GETEDITCONTROL message retrieves the handle to the edit control being used to edit a tree-view item’s text. You can send this message explicitly or by using the TreeView_GetEditControl macro.
TVM_GETEDITCONTROL wParam = 0; lParam = 0;
Returns the handle to the edit control if successful or NULL otherwise.