title: How to add image in CTreeCtrl list in MFC
body: <p>I am trying to add Image before the text in CTreeList control but it is not coming up, But what i observed is the the node name is started after some space , like it is leaving the space for bitmap , but image is not showing up.. here is the code snap:-</p>
  
  <pre><code>CImageList m_ImageList;
  
  CBitmap m_Bitmap1;
  
  m_ImageList.Create(16,16,ILC_COLOR32,1,1);
  
  m_Bitmap1.LoadBitmap(IDB_BITMAP1);
  
  m_ImageList.Add(&amp;m_Bitmap1, RGB(0,0,0));
  
  TreeSoft-&gt;Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP |
              TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT |
              TVS_SINGLEEXPAND | TVS_SHOWSELALWAYS |  
              TVS_TRACKSELECT,
              CRect(10, 10, 200, 240), this, 0x1221);
  
  
      TreeSoft-&gt;SetImageList(&amp;m_ImageList, TVSIL_NORMAL);
  
  hTree = TreeSoft-&gt;InsertItem( L"Software Production",0,0, TVI_ROOT);
  
  hCompany = TreeSoft-&gt;InsertItem(L"Microsoft",0,0, hTree);
  </code></pre>
  
  <p>Pls tell me what i am missing here...</p>