When I call the function:
Like this:Code:void AddToTreeView(char cName[MAX_PATH], int nArea) { MessageBox(0,cName,0,0); tvi.pszText=TEXT(cName); //item label tvi.cchTextMax=lstrlen(tvi.pszText); //length of item label tvis.item=tvi; tvis.hParent=hPrev; //parent item of item about to be inserted hPrev=(HTREEITEM)SendMessage(g_hwndTreeView,TVM_INSERTITEM,0,(LPARAM)&tvis); }
When I run it the MessageBox displays the text that I want. And a item is added to the tree-view. But with no text/title. Why is this? And how can I fix it?Code:AddToTreeView(cFile,1);
Thanks, August.



LinkBack URL
About LinkBacks


