| 79 | } |
| 80 | |
| 81 | bool CRegistryManagerView::GoToItem(PCWSTR path, PCWSTR name, PCWSTR data) { |
| 82 | TreeHelper th(m_Tree); |
| 83 | auto hItem = th.FindItem(path[0] == L'\\' ? m_hRealReg : m_hStdReg, path); |
| 84 | if (!hItem) |
| 85 | return false; |
| 86 | |
| 87 | SetActiveWindow(); |
| 88 | m_UpdateNoDelay = true; |
| 89 | m_Tree.SelectItem(hItem); |
| 90 | UpdateList(); |
| 91 | if (name && *name) { |
| 92 | int index = m_List.FindItem(name, false); |
| 93 | if (index >= 0) { |
| 94 | m_List.SetSelectionMark(index); |
| 95 | m_List.SetItemState(index, LVIS_SELECTED, LVIS_SELECTED); |
| 96 | m_List.SetFocus(); |
| 97 | } |
| 98 | } |
| 99 | else { |
| 100 | m_Tree.SetFocus(); |
| 101 | } |
| 102 | return true; |
| 103 | } |
| 104 | |
| 105 | LRESULT CRegistryManagerView::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&) { |
| 106 | ::RegDeleteTree(HKEY_CURRENT_USER, DeletedPathBackup.Left(DeletedPathBackup.GetLength() - 1)); |