This function is used to select an item of a Tree View common control. Once an item is selected, it is the ultimate recipient of mouse clicks and keystrokes sent to the control. Placing the text of an item and each of its ancestor items starting at the root into a string specifies an item. A tab character must delimit each item’s text.
The class name for this control is "SysTreeView32".
cSetTVItem (window-handle, item-path)
(i) window-handle Windows handle to a Tree View common control.
(s) item-path Tab-delimited list of item text.
(i) @TRUE, if item is selected. @FALSE, if item is not selected.
32-bit Extender
This function is designed for Windows 32-bit application controls. It cannot be used on Windows 64-bit controls.
64-bit Extender
This function is designed for Windows 64-bit application controls. It cannot be used on Windows on 32-bit controls.
AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
; Find the Explorer tree control hwnd = DllHwnd("Exploring") hwnd = cWndbyclass(hwnd, "BaseBar") hwnd = cWndbyclass(hwnd, "ReBarWindow32") hwnd = cWndbyclass(hwnd,"SysTreeView32") ; Path to the "ctlmgr" item (note the space before "(C)"). selection = "Desktop%@TAB%My Computer%@TAB% (C:)%@TAB%ctlmgr" ; Select the item from the tree control. If cSetTvItem(hwnd, selection) ; Double click the selected item. If !cDblClickItem(hwnd, 0) Message ("cddblckikcitem", "Failed") EndIf Else ; Can't select the item selection = StrReplace(selection,@TAB, @CRLF) Message("Item not selected", "Node tree:%@CRLF% %selection% %@CRLF%- not found.") EndIf Exit
cClearTVItem, cDblClickItem, cWndByClass, cWndinfo, DLLhwnd (WIL help).