コード例 #1
0
ファイル: SpiderWnd.cpp プロジェクト: naroya/freedownload
void CSpiderWnd::_DownloaderEvents(fsWebPageDownloader *dldr, fsWPDEvent ev, fsDownload *dld, fsDLWebPage *wp, fsDLWebPageTree wptree, LPVOID lp)
{
	CSpiderWnd* pThis = (CSpiderWnd*)  lp;

	WmSWDownloaderEventParam *p = new WmSWDownloaderEventParam;
	p->dldr = dldr;
	p->ev = ev;
	p->dld = dld;
	p->wp = wp;
	p->wptree = wptree;

	if (ev == WPDE_FILEADDED)
		p->wptreeAdded = wptree ? wptree->GetLeaf (wptree->GetLeafCount () - 1) : NULL;

	pThis->PostMessage (WM_SW_DOWNLOADER_EVENT, 0, (LPARAM)p);
}
コード例 #2
0
void CSpiderTaskTree::AddTree(fsDLWebPageTree tree, HTREEITEM hParent)
{
	fsDLWebPage *wp = tree->GetData ();
	int iImage = GetDownloadImage (wp);
	HTREEITEM hItem = InsertItem (wp->strURL, iImage,  iImage, hParent, TVI_SORT);
	
	_Conformity conf; 
	conf.hItem = hItem;
	conf.wptree = tree;
	m_vConfs.add (conf);

	SetItemData (hItem, (DWORD)tree);

	
	for (int i = 0; i < tree->GetLeafCount (); i++)
		AddTree (tree->GetLeaf (i), hItem);

	Expand (hItem, TVE_EXPAND);
}