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

Method GoToItem

WinArk/View.cpp:81–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81bool 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
105LRESULT CRegistryManagerView::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&) {
106 ::RegDeleteTree(HKEY_CURRENT_USER, DeletedPathBackup.Left(DeletedPathBackup.GetLength() - 1));

Callers

nothing calls this directly

Calls 1

FindItemMethod · 0.45

Tested by

no test coverage detected