Okay, this is my problem now:
When I run this:
Code:
case DO_CREATE:
{
int a,b;
a=1,b=2;
//add some items to the the tree view common control
tvi.mask=TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_DI_SETITEM;
tvi.pszText=TEXT(tempSrc); //item label
tvi.cchTextMax=lstrlen(tvi.pszText); //length of item label
tvi.iImage=a;
tvi.iSelectedImage=b;
tvis.item=tvi;
tvis.item.mask = TVIF_TEXT;
tvis.hInsertAfter=0;
tvis.hParent=TVI_ROOT; //parent item of item about to be inserted
hPrev[CShPrev]=(HTREEITEM)SendMessage(g_hwndTreeView,TVM_INSERTITEM,0,(LPARAM)&tvis);
return 0;
}
//...
//...
//...
bool FindFiles_(int nType, char cFile[MAX_PATH])
{
MessageBox(hwndOtherUse,cFile,0,0);
if(nType == DIR)
PostMessage(hwndOtherUse, DO_CREATE, MAKEWPARAM(1, 0), 0);
else if(nType == DOC)
PostMessage(hwndOtherUse, DO_CREATE, MAKEWPARAM(1, 0), 0);
}
It works fine.
But... when I take the line MessageBox(hwndOtherUse,cFile,0,0); out, all of the titles are the same on all of the items.
I have not the slightest idea why displaying some text in a message box makes it work fine, an without it, not work.
Please help, thanks, August.