nt);
while (hThisItem != NULL)
{
GetItemImage(hThisItem, nImage, nSelectedImage);
if (nImage == 1) // this item is a directory
{
strFileName = GetItemText(hThisItem);
// build the full path to the current directory
strFullSearchPath = strDir + strFileName + _T("/*");
pTempFtpFind = new CFtpFileFind(m_pFtpConnection);
if (pTempFtpFind->FindFile(strFullSearchPath))
{
tvstruct.hParent = hThisItem;
tvstruct.hInsertAfter = TVI_LAST;
tvstruct.item.iImage = 1;
tvstruct.item.iSelectedImage = 1;
tvstruct.item.pszText = _T("1");;
tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
InsertItem(&tvstruct);
}
pTempFtpFind->Close();
delete pTempFtpFind;
}
hThisItem = GetNextSiblingItem(hThisItem);
}
}
return;
}
void CMyTreeCtrl::OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
// TODO: Add your control notification handler code here
// find out what item is getting expanded, and send that to Expand(hItem, TVE_EXPAND)
if (pNMTreeView->hdr.code == TVN_ITEMEXPANDING)
{
HTREEITEM hIT = pNMTreeView->itemNew.hItem;
CString cstr, strPath;
// build up the path to htreeitem
strPath = GetItemText(hIT);
while (hIT != GetR
上一篇:
IFirstService1.pas
下一篇:
村落共同体的核心架构研究