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

Method FindItemByPath

WinArk/View.cpp:706–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706HTREEITEM 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
729LRESULT CRegistryManagerView::OnTreeEndEdit(int /*idCtrl*/, LPNMHDR hdr, BOOL& /*bHandled*/) {
730 auto& item = ((NMTVDISPINFO*)hdr)->item;

Callers

nothing calls this directly

Calls 2

IsEmptyMethod · 0.80
FindChildMethod · 0.80

Tested by

no test coverage detected