MyFtpDlg.h
上传用户:qzzxgm
上传日期:2009-12-14
资源大小:1882k
文件大小:3k
- // MyFtpDlg.h : header file
- //
- #if !defined(AFX_MYFTPDLG_H__D3975D47_86C5_11D6_8F32_00E04CE76240__INCLUDED_)
- #define AFX_MYFTPDLG_H__D3975D47_86C5_11D6_8F32_00E04CE76240__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- /////////////////////////////////////////////////////////////////////////////
- // CMyFtpDlg dialog
- //保存文件信息
- typedef struct FileItem
- {
- int nItem; //在列表框中的索引
- BOOL bDir; //是文件夹?
- CString strFileName; //文件名
- }FILEITEM;
- class CMyFtpDlg : public CDialog
- {
- // Construction
- public:
- CMyFtpDlg(CWnd* pParent = NULL); // standard constructor
- // Dialog Data
- //{{AFX_DATA(CMyFtpDlg)
- enum { IDD = IDD_MYFTP_DIALOG };
- CListCtrl m_ctrlRemoteFiles;
- CListCtrl m_ctrlLocalFiles;
- CString m_strPassword;
- CString m_strServer;
- CString m_strUserName;
- //}}AFX_DATA
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMyFtpDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- HICON m_hIcon;
-
- CInternetSession* m_pInetSession; //会话对象
- CFtpConnection* m_pFtpConnection; //连接对象
- CFtpFileFind* m_pRemoteFinder; //远程查找文件对象
- CFileFind m_LocalFinder; //本地查找文件对象
- CString m_strLocalParentRoot; //本地文件目录的上上一层目录
- CString m_strRemoteParentRoot; //远程文件目录的上上一层目录
- CArray<FILEITEM,FILEITEM&>m_arrLocalFiles; //保存本地文件信息
- CArray<FILEITEM,FILEITEM&>m_arrRemoteFiles; //保存远程文件信息
- void BrowseDir(CString strDir,CListCtrl* pLstCtrl,CFileFind* pFinder,CArray<FILEITEM,FILEITEM&>* pFilesArr);
- void DownFile(FILEITEM fileItem);
- void UpFile(FILEITEM fileItem);
- void AddItem(CListCtrl* pLstCtrl,int nIndex,BOOL bDir,CString strText);
- void SetListCtrlStyle(CListCtrl* pLstCtrl);
- void AddHeaders(CListCtrl* pLstCtrl);
- // Generated message map functions
- //{{AFX_MSG(CMyFtpDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- afx_msg void OnConnect();
- afx_msg void OnDownload();
- afx_msg void OnLocalUp();
- afx_msg void OnLocalDownd();
- afx_msg void OnRemoteUp();
- afx_msg void OnRemoteDownd();
- afx_msg void OnUpload();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MYFTPDLG_H__D3975D47_86C5_11D6_8F32_00E04CE76240__INCLUDED_)