MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / FindItem

Method FindItem

WinArk/TreeHelper.cpp:16–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16HTREEITEM TreeHelper::FindItem(HTREEITEM hParent, PCWSTR path) {
17 int start = 0;
18 CString spath(path);
19 if (spath[0] == L'\\') {
20 // skip first
21 spath = spath.Mid(spath.Find(L'\\', 1));
22 }
23
24 HTREEITEM hItem = nullptr;
25 while (hParent) {
26 auto name = spath.Tokenize(L"\\", start);
27 if (name.IsEmpty())
28 break;
29 _tv.Expand(hParent, TVE_EXPAND);
30 hItem = FindChild(hParent, name);
31 if (!hItem)
32 break;
33 hParent = hItem;
34 }
35 return hItem;
36}
37
38int TreeHelper::DeleteChildren(HTREEITEM hItem) {
39 int count = 0;

Callers 5

OnFindUpdateMethod · 0.45
GoToItemMethod · 0.45
GotoKeyMethod · 0.45
ShowValuePropertiesMethod · 0.45

Calls 3

FindMethod · 0.80
IsEmptyMethod · 0.80
ExpandMethod · 0.80

Tested by

no test coverage detected