📄 httpandftptestdlg.h
字号:
// HttpAndFtpTestDlg.h : header file
//
#if !defined(AFX_HTTPANDFTPTESTDLG_H__1B204205_3424_4882_AA4C_0135FD4CB12B__INCLUDED_)
#define AFX_HTTPANDFTPTESTDLG_H__1B204205_3424_4882_AA4C_0135FD4CB12B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CHttpAndFtpTestDlg dialog
typedef struct _DOWNLOAD_URLS_
{
char **ppszUrls;
int nUrlNum;
}URLS,*PURLS;
class CHttpAndFtpTestDlg : public CDialog
{
// Construction
public:
CHttpAndFtpTestDlg(CWnd* pParent = NULL); // standard constructor
public:
int GetProtocolFlag();
CString GetSavePath();
public:
void urlDownload();
void httpDownload();
void ftpDownload();
private:
int m_nProtocolFlag; // 0:URL;1:HTTP;2:FTP
URLS m_URLS;
HINTERNET m_hSession;
char *m_pszFileBuffer;
CString m_strResultFiles;
BOOL m_bHaveCreatedFolder;
private:
BOOL InitializeHintnet(HINTERNET *hSession);
BOOL GetUrlsFromTxt(LPCSTR szPath);
BOOL CreatSaveDir(LPCSTR szDirectory);
BOOL WriteMsgIntoFile(LPCSTR szFileName,LPCSTR szErrorInfo);
// Dialog Data
//{{AFX_DATA(CHttpAndFtpTestDlg)
enum { IDD = IDD_HTTPANDFTPTEST_DIALOG };
CProgressCtrl m_ProgressCtrl;
CString m_strStatic;
CString m_strSavePath;
BOOL m_bQuerySize;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHttpAndFtpTestDlg)
public:
virtual BOOL DestroyWindow();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CHttpAndFtpTestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnHttpDownload();
afx_msg void OnFtpDownload();
afx_msg void OnButtonUrldown();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnButtonShowresult();
afx_msg void OnButtonHelp();
afx_msg void OnButtonCreatedownloadfolder();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HTTPANDFTPTESTDLG_H__1B204205_3424_4882_AA4C_0135FD4CB12B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -