FTPSOCKETDlg.h
上传用户:ap04031022
上传日期:2022-02-14
资源大小:1981k
文件大小:3k
源码类别:

Ftp客户端

开发平台:

Visual C++

  1. // FTPSOCKETDlg.h : header file
  2. //
  3. #if !defined(AFX_FTPSOCKETDLG_H__E0B6E988_9D2B_4461_8694_DDAB5027F497__INCLUDED_)
  4. #define AFX_FTPSOCKETDLG_H__E0B6E988_9D2B_4461_8694_DDAB5027F497__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. #include "FTPclass.h"
  9. #include "ListItem.h"
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CFTPSOCKETDlg dialog
  12. #define WM_SETFILE     WM_USER +100
  13. #define WM_SETREDRAWFLAG     WM_USER +101
  14. #define WM_SETDIRECTORYDISPLAY     WM_USER +102
  15. #define WM_REDISPLAYFILE     WM_USER +103
  16. #define WM_SETDIR     WM_USER +104
  17. enum
  18. {
  19. FILEICON,
  20. DIRECTORYICON,
  21. LOCFILE,
  22. SERVFILE
  23. };
  24. class CFTPSOCKETDlg : public CDialog
  25. {
  26. // Construction
  27. public:
  28. CFTPSOCKETDlg(CWnd* pParent = NULL); // standard constructor
  29. // Dialog Data
  30. //{{AFX_DATA(CFTPSOCKETDlg)
  31. enum { IDD = IDD_FTPSOCKET_DIALOG };
  32. CListCtrl m_ctrlServerFile;
  33. CListCtrl m_ctrlLocalFile;
  34. CComboBoxEx m_ctrlServer;
  35. CComboBoxEx m_ctrlLocal;
  36. CString m_PWD;
  37. CString m_Server;
  38. CString m_UID;
  39. CString m_Message;
  40. int m_Port;
  41. BOOL m_PASV;
  42. //}}AFX_DATA
  43. BOOL m_bHaveDotFlag;
  44. CFTPclient ftp;
  45. CImageList* m_pDragImageList;
  46. CImageList m_ctImageList;
  47. int m_iDirCount;
  48. typedef struct
  49. {
  50. char szFileName[256];
  51. char szFileDate[20];
  52. char szFileSize[20];
  53. int nType;
  54. }FILE_FTP_INFO;
  55. // ClassWizard generated virtual function overrides
  56. //{{AFX_VIRTUAL(CFTPSOCKETDlg)
  57. protected:
  58. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  59. //}}AFX_VIRTUAL
  60. // Implementation
  61. HICON m_hIcon;
  62. // Generated message map functions
  63. //{{AFX_MSG(CFTPSOCKETDlg)
  64. virtual BOOL OnInitDialog();
  65. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  66. afx_msg void OnPaint();
  67. afx_msg HCURSOR OnQueryDragIcon();
  68. afx_msg void OnButtonConnect();
  69. afx_msg void OnDblclkListLocalfile(NMHDR* pNMHDR, LRESULT* pResult);
  70. afx_msg void OnSelchangeComboboxexLocal();
  71. afx_msg void OnDblclkListServerfile(NMHDR* pNMHDR, LRESULT* pResult);
  72. //}}AFX_MSG
  73. protected:
  74. /*
  75. afx_msg void OnLocFileOpen();
  76. */
  77. void OnInsertFile(CListCtrl* pListCtrl,LPVOID pIn,LPARAM lParam);
  78. void GetFileIcon(CString& fileName,int* iIcon,int* iIconSel=NULL);
  79. BOOL SetImageList(CListCtrl* pListCtrl,CComboBoxEx* pCombo=NULL);
  80. void SetFileColumns(CListCtrl* pListCtrl);
  81. void GetLocDir();
  82. int InsertLocDir(CString &str, int iIcon, int iIconSel);
  83. void GetLocCurrentDirectory();
  84. BOOL BeginFindLocFile();
  85. void FindLocFile();
  86. void SetServerDir(CString& str);
  87. UINT FindServFile();
  88. //void Server
  89. void AddLine(CString strLine);
  90. BOOL AddItem(CListItem *pItem);
  91. void SetServerFileColumns(CListCtrl *pListCtrl);
  92. void CD(CString dir);
  93. void Back();
  94. void UpLoadFile(CString LocalFilePath,CString LocalFileName,bool pasv,bool get);
  95. void DownLoadFile(CString ServerFilePath,CString ServerFileName,bool pasv,bool get);
  96. afx_msg LRESULT OnReDisplayLocFile(WPARAM wParam,LPARAM lParam);
  97. afx_msg LRESULT OnSetLocDirectoryDisplay(WPARAM wParam,LPARAM lParam);
  98. afx_msg LRESULT OnInsertLocFile(WPARAM wParam,LPARAM lParam);
  99. afx_msg LRESULT OnSetLocRedrawFlag(WPARAM wParam,LPARAM lParam);
  100. afx_msg LRESULT OnSetLocDir(WPARAM wParam,LPARAM lParam);
  101. DECLARE_MESSAGE_MAP()
  102. };
  103. //{{AFX_INSERT_LOCATION}}
  104. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  105. #endif // !defined(AFX_FTPSOCKETDLG_H__E0B6E988_9D2B_4461_8694_DDAB5027F497__INCLUDED_)