91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.77MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-10
  • 語言: C/C++
  • 標(biāo)簽: MFC??

資源簡(jiǎn)介

支持文件上傳下載,以及在線瀏覽目錄。等功能

資源截圖

代碼片段和文件信息

//?FileTree.cpp?:?implementation?file
//

#include?“stdafx.h“
#include?“FtpClient.h“
#include?“FileTree.h“

//add?new
#include?“MainFrm.h“
#include?“FtpClientView.h“
#include?“MsgShow.h“

#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
//?CFileTree

IMPLEMENT_DYNCREATE(CFileTree?CTreeView)

CFileTree::CFileTree()
{
tree?=?&GetTreeCtrl();
m_bDragging?=?false;
}

CFileTree::~CFileTree()
{
}


BEGIN_MESSAGE_MAP(CFileTree?CTreeView)
//{{AFX_MSG_MAP(CFileTree)
ON_NOTIFY_REFLECT(TVN_BEGINDRAG?OnBegindrag)
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
//?CFileTree?drawing

void?CFileTree::OnDraw(CDC*?pDC)
{
CDocument*?pDoc?=?GetDocument();
//?TODO:?add?draw?code?here
}

/////////////////////////////////////////////////////////////////////////////
//?CFileTree?diagnostics

#ifdef?_DEBUG
void?CFileTree::AssertValid()?const
{
CTreeView::AssertValid();
}

void?CFileTree::Dump(CDumpContext&?dc)?const
{
CTreeView::Dump(dc);
}
#endif?//_DEBUG

/////////////////////////////////////////////////////////////////////////////
//?CFileTree?message?handlers
VOID?CFileTree::deleteItem()
{
tree->DeleteAllItems();
}

//注:函數(shù)只適用于遍歷目錄,而非查找文件
VOID?CFileTree::BrowseDir(CString?strDirHTREEITEM?hParent)
{
CFileFind fFind;
CString strFileName;

if(strDir.Right(2)?!=?“\\“) //important!
{
strDir?+=?“\\*.*“;
}

BOOL?IsTrue?=?fFind.FindFile(strDir);

while(IsTrue)
{
IsTrue?=?fFind.FindNextFile();

if(?fFind.IsDirectory()?&&?!fFind.IsDots()?)
{
CString strPath?=?fFind.GetFilePath();
strFileName?=?fFind.GetFileName();

HTREEITEM hChild?=?tree->InsertItem(strFileName00hParent);

BrowseDir(strPathhChild);
}
else??if(?!fFind.IsDirectory()?&&?!fFind.IsDots()?)
{
strFileName?=?fFind.GetFileName();

tree->InsertItem(strFileName11hParent);
}
}

fFind.Close();
}


BOOL?CFileTree::PreCreateWindow(CREATESTRUCT&?cs)?
{
//?TODO:?Add?your?specialized?code?here?and/or?call?the?base?class

//add?new?更改控件的style
cs.style?|=?TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT|TVS_EDITLABELS;

return?CTreeView::PreCreateWindow(cs);
}

void?CFileTree::OnInitialUpdate()?
{
CTreeView::OnInitialUpdate();

//?TODO:?Add?your?specialized?code?here?and/or?call?the?base?class
//獲取圖標(biāo)句柄
HICON?hicon1?=?AfxGetApp()->LoadIcon(IDI_ICON1);
HICON?hicon2?=?AfxGetApp()->LoadIcon(IDI_ICON2);

//創(chuàng)建圖標(biāo)列表
m_lpImagelist.Create(1616ILC_COLOR1622);
m_lpImagelist.Add(hicon1);
m_lpImagelist.Add(hicon2);

//關(guān)聯(lián)圖像列表
tree->SetImageList(&m_lpImagelistTVSIL_NORMAL);
}

void?CFileTree::OnBegindrag(NMHDR*?pNMHDR?LRESULT*?pResult)?
{
NM_TREEVIEW*?pNMTreeView?=?(NM_TREEVIEW*)

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????42945??2013-03-28?16:03??FtpClient\Debug\FileTree.obj

?????文件??????????0??2013-03-28?16:03??FtpClient\Debug\FileTree.sbr

?????文件????5530624??2013-03-28?16:22??FtpClient\Debug\FtpClient.bsc

?????文件?????143456??2013-03-28?16:22??FtpClient\Debug\FtpClient.exe

?????文件?????452552??2013-03-28?16:22??FtpClient\Debug\FtpClient.ilk

?????文件??????25470??2013-01-12?16:06??FtpClient\Debug\FtpClient.obj

?????文件????7011184??2013-01-12?10:48??FtpClient\Debug\FtpClient.pch

?????文件?????623616??2013-03-28?16:22??FtpClient\Debug\FtpClient.pdb

?????文件???????9640??2013-01-12?16:06??FtpClient\Debug\FtpClient.res

?????文件??????????0??2013-01-12?16:06??FtpClient\Debug\FtpClient.sbr

?????文件??????14871??2013-01-12?10:48??FtpClient\Debug\FtpClientDoc.obj

?????文件??????????0??2013-01-12?10:48??FtpClient\Debug\FtpClientDoc.sbr

?????文件??????43309??2013-03-28?16:22??FtpClient\Debug\FtpClientView.obj

?????文件??????????0??2013-03-28?16:22??FtpClient\Debug\FtpClientView.sbr

?????文件??????33198??2013-01-14?11:12??FtpClient\Debug\MainFrm.obj

?????文件??????????0??2013-01-14?11:13??FtpClient\Debug\MainFrm.sbr

?????文件??????19915??2013-01-12?13:32??FtpClient\Debug\MsgShow.obj

?????文件??????????0??2013-01-12?13:44??FtpClient\Debug\MsgShow.sbr

?????文件?????105654??2013-01-12?13:31??FtpClient\Debug\StdAfx.obj

?????文件????1376875??2013-01-12?13:31??FtpClient\Debug\StdAfx.sbr

?????文件?????246784??2018-08-15?13:13??FtpClient\Debug\vc60.idb

?????文件?????413696??2013-03-28?16:22??FtpClient\Debug\vc60.pdb

?????文件???????6999??2013-03-28?16:03??FtpClient\FileTree.cpp

?????文件???????2155??2013-01-12?11:08??FtpClient\FileTree.h

?????文件??????31568??2018-08-15?13:09??FtpClient\FtpClient.aps

?????文件???????2876??2018-08-15?13:09??FtpClient\FtpClient.clw

?????文件???????4263??2013-01-10?09:17??FtpClient\FtpClient.cpp

?????文件???????5045??2013-01-11?18:21??FtpClient\FtpClient.dsp

?????文件????????543??2013-01-10?09:18??FtpClient\FtpClient.dsw

?????文件???????1389??2013-01-10?09:17??FtpClient\FtpClient.h

............此處省略28個(gè)文件信息

評(píng)論

共有 條評(píng)論