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

Method OnFindUpdate

WinArk/View.cpp:35–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35LRESULT CRegistryManagerView::OnFindUpdate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) {
36 TreeHelper th(m_Tree);
37 HTREEITEM hItem;
38 auto fd = reinterpret_cast<FindData*>(lParam);
39 if (fd->Path[0] != L'\\') {
40 hItem = th.FindItem(m_hStdReg, fd->Path);
41 }
42 else {
43 hItem = th.FindItem(m_hRealReg, fd->Path);
44 }
45 ATLASSERT(hItem);
46 m_Tree.SelectItem(hItem);
47 m_Tree.EnsureVisible(hItem);
48 if ((fd->Name == nullptr || *fd->Name == 0) && (fd->Data == nullptr || *fd->Data == 0)) {
49 m_Tree.SetFocus();
50 }
51 else {
52 UpdateList(true);
53 int index = ListViewHelper::FindItem(m_List, fd->Data ? fd->Data : fd->Name, true);
54 ATLASSERT(index >= 0);
55 m_List.EnsureVisible(index, FALSE);
56 m_List.SetItemState(index, LVIS_SELECTED, LVIS_SELECTED);
57 m_List.SetSelectionMark(index);
58 m_List.SetFocus();
59 }
60 return 0;
61}
62
63void CRegistryManagerView::OnFindNext(PCWSTR path, PCWSTR name, PCWSTR data) {
64 ATLTRACE(L"Found: %s, %s, %s\n", path, name, data);

Callers

nothing calls this directly

Calls 1

FindItemMethod · 0.45

Tested by

no test coverage detected