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

金融证券系统

开发平台:

Visual C++

  1. // SimuView.h : interface of the CSimuView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_SIMUVIEW_H__2C0009CF_8889_46CD_B38B_4743C1A75F62__INCLUDED_)
  5. #define AFX_SIMUVIEW_H__2C0009CF_8889_46CD_B38B_4743C1A75F62__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CParamDlg;
  10. #define WM_USER_SIMULATION_PROGRESS (WM_USER+1001)
  11. #define WM_USER_SIMULATION_YIELD (WM_USER+1002)
  12. #define WM_USER_SIMULATION_END (WM_USER+1003)
  13. #include "Simulation.h"
  14. #include "ParamDlg/SetParamDlg.h"
  15. /***
  16. 策略视图
  17. */
  18. class CSimuView : public CFormView
  19. {
  20. protected: // create from serialization only
  21. CSimuView();
  22. DECLARE_DYNCREATE(CSimuView)
  23. public:
  24. //{{AFX_DATA(CSimuView)
  25. enum { IDD = IDD_SIMU_FORM };
  26. CEdit m_editSellMulti;
  27. CButton m_btnAdvanced;
  28. CEdit m_editStockTech;
  29. CComboBox m_comboSellLogic;
  30. CComboBox m_comboBuyLogic;
  31. CButton m_btnStop;
  32. CEdit m_editStartAmount;
  33. CStatic m_staticYield2;
  34. CStatic m_staticYield;
  35. CDateTimeCtrl m_tmctrlBegin;
  36. CDateTimeCtrl m_tmctrlEnd;
  37. CComboBox m_comboStoreDiv;
  38. CIntensityComboBox m_comboSellLimit;
  39. CEdit m_editBuyMulti;
  40. CIntensityComboBox m_comboBuyLimit;
  41. CComboBox m_comboMaindataType;
  42. CStatic m_staticWarning;
  43. CStatic m_staticTitle;
  44. CButton m_btnRealOp;
  45. CButton m_btnSetRule;
  46. CButton m_btnSetRate;
  47. CButton m_btnSetPrpt;
  48. CButton m_btnReport;
  49. CButton m_btnSelectStk;
  50. CButton m_btnStart;
  51. CProgressCtrl m_progress;
  52. CKTypeComboBox m_comboKType;
  53. CString m_strBuyMulti;
  54. CSPTime m_tmBegin;
  55. CSPTime m_tmEnd;
  56. long m_nStartAmount;
  57. CString m_strSellMulti;
  58. //}}AFX_DATA
  59. // Attributes
  60. public:
  61. inline virtual CStaticDoc* GetDocument()   { return (CStaticDoc *)m_pDocument; }
  62. CStrategy * GetStrategy( );
  63. // Operations
  64. public:
  65. BOOL CanChangeActiveStrategy( );
  66. virtual void OnActiveStrategyChanged( );
  67. BOOL LoadFromStrategy( );
  68. BOOL StoreToStrategy( );
  69. // Overrides
  70. // ClassWizard generated virtual function overrides
  71. //{{AFX_VIRTUAL(CSimuView)
  72. public:
  73. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  74. protected:
  75. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  76. virtual void OnInitialUpdate(); // called first time after construct
  77. virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  78. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  79. //}}AFX_VIRTUAL
  80. // Implementation
  81. public:
  82. virtual ~CSimuView();
  83. #ifdef _DEBUG
  84. virtual void AssertValid() const;
  85. virtual void Dump(CDumpContext& dc) const;
  86. #endif
  87. protected:
  88. CStrategy * m_pStrategy;
  89. CSimulation m_simulation;
  90. BOOL m_bDisableAllControls;
  91. // Initialize Functions
  92. BOOL InitComboMaindataType( );
  93. BOOL InitComboBuyLogic( );
  94. BOOL InitComboBuyLimit( );
  95. BOOL InitComboSellLogic( );
  96. BOOL InitComboSellLimit( );
  97. BOOL InitComboStoreDiv( );
  98. BOOL EnableControls( );
  99. BOOL ClearData( );
  100. BOOL SelectComboItem( CComboBox & combo, DWORD dwData );
  101. // Generated message map functions
  102. protected:
  103. //{{AFX_MSG(CSimuView)
  104. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  105. afx_msg void OnSize(UINT nType, int cx, int cy);
  106. afx_msg void OnSetFocus(CWnd* pOldWnd);
  107. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  108. afx_msg void OnSetprpt();
  109. afx_msg void OnSelectstk();
  110. afx_msg void OnSetrule();
  111. afx_msg void OnSetrate();
  112. afx_msg void OnReport();
  113. afx_msg void OnRealOp();
  114. afx_msg void OnStart();
  115. afx_msg void OnStop();
  116. afx_msg void OnCloseupTimeBegin(NMHDR* pNMHDR, LRESULT* pResult);
  117. afx_msg void OnCloseupTimeEnd(NMHDR* pNMHDR, LRESULT* pResult);
  118. afx_msg void OnTimer(UINT nIDEvent);
  119. afx_msg void OnAdvanced();
  120. //}}AFX_MSG
  121. afx_msg LRESULT OnGetViewTitle( WPARAM wParam, LPARAM lParam );
  122. afx_msg LRESULT OnGetViewCmdid( WPARAM wParam, LPARAM lParam );
  123. afx_msg LRESULT OnCanCloseView( WPARAM wParam, LPARAM lParam );
  124. afx_msg LRESULT OnColorChange( WPARAM wParam, LPARAM lParam );
  125. afx_msg LRESULT OnSimulationProgress( WPARAM wParam, LPARAM lParam );
  126. afx_msg LRESULT OnSimulationYield( WPARAM wParam, LPARAM lParam );
  127. afx_msg LRESULT OnSimulationEnd( WPARAM wParam, LPARAM lParam );
  128. DECLARE_MESSAGE_MAP()
  129. };
  130. /////////////////////////////////////////////////////////////////////////////
  131. //{{AFX_INSERT_LOCATION}}
  132. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  133. #endif // !defined(AFX_SIMUVIEW_H__2C0009CF_8889_46CD_B38B_4743C1A75F62__INCLUDED_)