| 704 | } |
| 705 | |
| 706 | HTREEITEM CRegistryManagerView::FindItemByPath(PCWSTR path) const { |
| 707 | CTreeItem item; |
| 708 | if (path[0] == L'\\') { |
| 709 | // real registry |
| 710 | item = m_hRealReg; |
| 711 | } |
| 712 | else { |
| 713 | // standard registry |
| 714 | item = m_hStdReg; |
| 715 | } |
| 716 | |
| 717 | CString spath(path); |
| 718 | int start = 0; |
| 719 | while (true) { |
| 720 | auto token = spath.Tokenize(L"\\", start); |
| 721 | if (token.IsEmpty()) |
| 722 | break; |
| 723 | TreeHelper th(m_Tree); |
| 724 | item = th.FindChild(item, token); |
| 725 | } |
| 726 | return item; |
| 727 | } |
| 728 | |
| 729 | LRESULT CRegistryManagerView::OnTreeEndEdit(int /*idCtrl*/, LPNMHDR hdr, BOOL& /*bHandled*/) { |
| 730 | auto& item = ((NMTVDISPINFO*)hdr)->item; |