| 523 | } |
| 524 | |
| 525 | HTREEITEM CRegistryManagerView::BuildKeyPath(const CString& path, bool accessible) { |
| 526 | auto hItem = path[0] == L'\\' ? m_hRealReg : m_hStdReg; |
| 527 | CString name; |
| 528 | int start = path[0] == L'\\' ? 10 : 0; |
| 529 | TreeHelper th(m_Tree); |
| 530 | while (!(name = path.Tokenize(L"\\", start)).IsEmpty()) { |
| 531 | auto hChild = th.FindChild(hItem, name); |
| 532 | if (hChild) { |
| 533 | hItem = hChild; |
| 534 | continue; |
| 535 | } |
| 536 | hItem = InsertKeyItem(hItem, name, NodeType::Key | (accessible ? NodeType::None : NodeType::AccessDenied)); |
| 537 | } |
| 538 | return hItem; |
| 539 | } |
| 540 | |
| 541 | HTREEITEM CRegistryManagerView::GotoKey(const CString& path, bool knownToExist) { |
| 542 | CString spath(path); |