⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listcontent.h

📁 用Visual C++开发的一个FTP搜索工具。具有站点搜索、文件列表下载、文件搜索等功能
💻 H
字号:
#if !defined(AFX_LISTCONTENT_H__CEF67622_5A9B_42A7_9E13_039B1CCCB8E5__INCLUDED_)
#define AFX_LISTCONTENT_H__CEF67622_5A9B_42A7_9E13_039B1CCCB8E5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ListContent.h : header file
//
#include "FtpContent.h"
/////////////////////////////////////////////////////////////////////////////
// CListContent dialog

class CListContent : public CDialog 
{
// Construction
public:
	void ShowMessage(BOOL bFlag);
	CListContent(CWnd* pParent = NULL);   // standard constructor

	~CListContent() 
	{
		if(m_IsConnected) {
			if(pFileFind	!=	NULL)
			{
				pFileFind->Close();
				delete	pFileFind;
				pFileFind = NULL;
			}

			if(pConnection	!=	NULL)
			{
				pConnection->Close();
				delete	pConnection;
				pConnection = NULL;
			}
		}

		if(m_IsDbOpen) {
			CloseDb();
		}
	}

// Dialog Data
	//{{AFX_DATA(CListContent)
	enum { IDD = IDD_LISTCONTENT };
	CStatic	m_wndMsg;
	CButton	m_btnDownToDb;
	CButton	m_btnGetContent;
	CListCtrl	m_listContent;
	CIPAddressCtrl	m_IPAddrDest;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CListContent)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CString m_FtpSite;
	CString m_Directory;
	CString m_FileName;

	CString SEPARATOR;

	CDatabase *	p_Database;
	CFtpContent * p_Record;
	BOOL m_IsDbOpen;

	CInternetSession*	pSession	;
	CFtpConnection*		pConnection	;
	CFtpFileFind*		pFileFind	;

	//
	BOOL m_IsConnected;
	CStringArray m_Paths;
	CStringArray m_URLs;
	// Generated message map functions
	//{{AFX_MSG(CListContent)
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnGetContent();
	virtual BOOL OnInitDialog();
	afx_msg void OnDblclkContentlist(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDownToDB();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void CloseDb();
	BOOL OpenDb();
	BOOL ReAssemblePath();
	void ReAssembleDirectory(BOOL bFlag);
	void DisconnectedFromServer();
	void DownLoadContent();
	void DownLoadAllContent();
	BOOL ConnectToServer();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LISTCONTENT_H__CEF67622_5A9B_42A7_9E13_039B1CCCB8E5__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -