title: get lparam value form the htreeitem c++
body: <p>I created a dialog with a tree control which fetches data on to a list control when clicked on any particular node of the treecontrol. This is how i tried inserting nodes.</p>
  
  <pre><code>CString *sCommonAppkey = new CString(_szApp + sIsPath);
  
  HTREEITEM hrCommon = m_cTreeCtrl.InsertItem(TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM, _T("Common"), icoPlanit, icoPlanit, 0, 0, (LPARAM)(LPCTSTR)sCommonAppkey, NULL, NULL);
  </code></pre>
  
  <p>When clicked on a node it is being directed to the event handler "OnTvnSelchangedExample"
  and the data is fetched from the path specified in "lparam" parameter in the insertitem method of HTREEITEM.</p>
  
  <pre><code>void **CExample**::OnTvnSelchangedExample(NMHDR *pNMHDR, LRESULT *pResult)
  {
  LPNMTREEVIEW pNMTreeView = reinterpret_cast&lt;LPNMTREEVIEW&gt;(pNMHDR);
  
  LPARAM lp = pNMTreeView-&gt;itemNew.lParam;
  
      CString *sTempKey = (CString *)lp;
      CString path = sTempKey-&gt;GetBuffer();
  }
  </code></pre>
  
  <p>I can access the lparam value only in the event handler.</p>
  
  <p>Now i want to implement search functionality for the entire tree's data. </p>
  
  <p>so i need the lparam value of all Tree handles sequentially by iterating through it, so that i can search for the specific text in the tree.
  So without clicking on any node of the tree, is there any possibility to get the lparam value of Tree handle(HTREEITEM)</p>