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

Method InitTree

WinArk/View.cpp:327–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327void CRegistryManagerView::InitTree() {
328 WCHAR name[32];
329 DWORD len = _countof(name);
330 ::GetComputerName(name, &len);
331 m_hLocalRoot = m_Tree.InsertItem(name + CString(L" (Local)"), 1, 1, TVI_ROOT, TVI_LAST);
332 m_hLocalRoot.SetData(static_cast<DWORD_PTR>(NodeType::Machine));
333 m_hStdReg = m_Tree.InsertItem(L"Standard Registry", 0, 0, m_hLocalRoot, TVI_LAST);
334 SetNodeData(m_hStdReg, NodeType::StandardRoot);
335 m_hRealReg = m_Tree.InsertItem(L"REGISTRY", 11, 11, m_hLocalRoot, TVI_LAST);
336 SetNodeData(m_hRealReg, NodeType::RegistryRoot | NodeType::Predefined | NodeType::Key);
337 m_hLocalRoot.Expand(TVE_EXPAND);
338 m_Tree.SelectItem(m_hStdReg);
339}
340
341NodeType CRegistryManagerView::GetNodeData(HTREEITEM hItem) const {
342 return static_cast<NodeType>(m_Tree.GetItemData(hItem));

Callers

nothing calls this directly

Calls 3

InsertItemMethod · 0.80
SetDataMethod · 0.80
ExpandMethod · 0.80

Tested by

no test coverage detected