hi ,
I want to apply different images to different nodes in my MFC Treeview ? Currently i have have applied one image to my treeview root node now i want to apply different image to subnodes and how to expand all nodes in treeview , once i expand one node other get collapsed..
Currently i am doing like this :
CImageList *m_pNASImageList;
CBitmap m_objRootImg;
m_objRootImg.LoadBitmap(IDB_TREEVIEWROOTIMG);
m_objNASFolderImg.LoadBitmap(IDB_NASFOLDERIMG);
m_RootImageList = new CImageList();
m_RootImageList->Create(16,16,ILC_COLOR8,1,1);
m_RootImageList->Add(&m_objRootImg,RGB(250,190,79));
m_RootImageList->Add(&m_objNASFolderImg,RGB(250,190,79));
m_pTreeview->SetImageList(m_RootImageList,TVSIL_NORMAL);
HTREEITEM Htvi = m_pTreeview->InsertItem("NAS1", hparentitem);
m_pTreeview->SetItemImage(Htvi,1,1);
m_pTreeview->InsertItem("Animation", Htvi);
m_pTreeview->InsertItem("StoryBoard", Htvi);
I have loaded one image for my root and one for "NAS1" , how to load for animation & Storyboard what values i should give i have taken a third image ...
Any help is highly appreciated. Thanks.