downloaddlg.h
上传用户:zhanglf88
上传日期:2013-11-19
资源大小:6036k
文件大小:3k
源码类别:

金融证券系统

开发平台:

Visual C++

  1. #if !defined(AFX_DOWNLOADDLG_H__047CD860_CF70_45E7_BC04_CB594D31D679__INCLUDED_)
  2. #define AFX_DOWNLOADDLG_H__047CD860_CF70_45E7_BC04_CB594D31D679__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // DownloadDlg.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CDownloadDlg dialog
  10. #define WM_USER_DOWNLOAD_MESSAGE (WM_USER+1001)
  11. #define WM_USER_DOWNLOAD_PROGRESS (WM_USER+1002)
  12. #define WM_USER_DOWNLOAD_END (WM_USER+1003)
  13. typedef struct download_info_t {
  14. HWND hMainWnd;
  15. CNetDatabase * pNetDB;
  16. BOOL bReport;
  17. BOOL bDay;
  18. time_t tmDayFrom;
  19. time_t tmDayTo;
  20. BOOL bMin5;
  21. time_t tmMin5From;
  22. time_t tmMin5To;
  23. BOOL bBase;
  24. BOOL bXDR;
  25. } DOWNLOAD_INFO, * LPDOWNLOAD_INFO;
  26. /***
  27. 数据包下载对话框
  28. */
  29. class CDownloadDlg : public CDialog
  30. {
  31. // Construction
  32. public:
  33. CDownloadDlg(CWnd* pParent = NULL);   // standard constructor
  34. virtual ~CDownloadDlg();
  35. void SetInitDownloadTime( CSPTime tmDLBegin, CSPTime tmDLEnd, BOOL bAutoRun );
  36. static HANDLE m_hEventKillDownloadThread;
  37. static HANDLE m_hEventDownloadThreadKilled;
  38. // Dialog Data
  39. //{{AFX_DATA(CDownloadDlg)
  40. enum { IDD = IDD_DOWNLOAD };
  41. CStatic m_staticLatest;
  42. CStatic m_staticProgress;
  43. CButton m_btnCheckMin5;
  44. CButton m_btnCheckReport;
  45. CButton m_btnProxySet;
  46. CButton m_btnCancel;
  47. CStatic m_staticStatus;
  48. CButton m_btnOK;
  49. CButton m_btnStopRefresh;
  50. CButton m_btnStop;
  51. CButton m_btnRefreshServers;
  52. CButton m_btnCheckXDR;
  53. CButton m_btnCheckDay;
  54. CButton m_btnCheckBase;
  55. CDateTimeCtrl m_dtctrlDayTo;
  56. CDateTimeCtrl m_dtctrlDayFrom;
  57. CProgressCtrl m_ctrlProgress;
  58. CStatic m_staticRefreshServer;
  59. CComboBox m_comboServers;
  60. CSPTime m_tmDayFrom;
  61. CSPTime m_tmDayTo;
  62. CSPTime m_tmMin5From;
  63. CSPTime m_tmMin5To;
  64. //}}AFX_DATA
  65. protected:
  66. BOOL m_bStopRefresh;
  67. DOWNLOAD_INFO * m_pDownloadInfo;
  68. CNetDatabase m_netdb;
  69. CStringArray m_astrErrorPac;
  70. CSPTime m_tmLatestOld;
  71. BOOL m_bDBModified;
  72. // Init download time
  73. BOOL m_bInitDownloadTime;
  74. CSPTime m_tmDLBegin;
  75. CSPTime m_tmDLEnd;
  76. BOOL m_bAutoRun;
  77. // report
  78. UINT m_nReportCount;
  79.     BOOL m_bReportFinished;
  80. UINT m_nReportTotal;
  81. UINT m_nReportRequestSent;
  82. // Overrides
  83. // ClassWizard generated virtual function overrides
  84. //{{AFX_VIRTUAL(CDownloadDlg)
  85. public:
  86. virtual BOOL PreTranslateMessage(MSG* pMsg);
  87. protected:
  88. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  89. //}}AFX_VIRTUAL
  90. // Implementation
  91. protected:
  92. void InitComboServers( );
  93. // Generated message map functions
  94. //{{AFX_MSG(CDownloadDlg)
  95. virtual BOOL OnInitDialog();
  96. virtual void OnOK();
  97. virtual void OnCancel();
  98. afx_msg void OnRefreshServers();
  99. afx_msg void OnStopRefresh();
  100. afx_msg void OnStop();
  101. afx_msg void OnSetfocusTimeDay(NMHDR* pNMHDR, LRESULT* pResult);
  102. afx_msg void OnProxySet();
  103. afx_msg void OnSetfocusTimeMin5(NMHDR* pNMHDR, LRESULT* pResult);
  104. //}}AFX_MSG
  105. afx_msg LRESULT OnDownloadMessage( WPARAM wParam, LPARAM lParam );
  106. afx_msg LRESULT OnDownloadProgress( WPARAM wParam, LPARAM lParam );
  107. afx_msg LRESULT OnDownloadEnd( WPARAM wParam, LPARAM lParam );
  108. afx_msg LRESULT OnStkReceiverData( WPARAM wParam, LPARAM lParam );
  109. DECLARE_MESSAGE_MAP()
  110. };
  111. //{{AFX_INSERT_LOCATION}}
  112. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  113. #endif // !defined(AFX_DOWNLOADDLG_H__047CD860_CF70_45E7_BC04_CB594D31D679__INCLUDED_)