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

金融证券系统

开发平台:

Visual C++

  1. #if !defined(AFX_SIMUREPORT_H__4E52BCB0_344B_439E_90DB_CAB43552CA6D__INCLUDED_)
  2. #define AFX_SIMUREPORT_H__4E52BCB0_344B_439E_90DB_CAB43552CA6D__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // SimuReport.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // COpRecordListCtrl
  10. /***
  11. 策略报表ListCtrl
  12. */
  13. class CReportListCtrl : public CListCtrl
  14. {
  15. public:
  16. int GetSelected( );
  17. BOOL InitOpRecordList( );
  18. BOOL LoadOpRecordList( COpRecordContainer & container );
  19. BOOL InitNextOpList( );
  20. BOOL LoadNextOpList( COpRecordContainer & container );
  21. BOOL InitStockOwnList( );
  22. BOOL LoadStockOwnList( CStockOwnContainer & stockown, double dCash, CSPTime tmCur, double dAsset, CTechStockContainer & techstocks );
  23. void Copy( );
  24. };
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CCurveButton
  27. /***
  28. 策略变动曲线
  29. */
  30. class CCurveButton : public CButton
  31. {
  32. public:
  33. CCurveButton( );
  34. ~CCurveButton( );
  35. void SetAssetSerial( CAssetSerialContainer & src, double dStartAmount );
  36. BOOL Initialize( );
  37. virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  38. protected:
  39. virtual void PreSubclassWindow();
  40. BOOL DrawCurve( CDC * pDC, CRect rectClient, int nStart );
  41. BOOL PrepareDrawData(CRect rectClient, int nStart, int nWeight,
  42.    LPRECT prectDraw, int *pnStartNew, int *pnCount, double *pdMin, double *pdMax );
  43. void ResetScrollBars();
  44. int GetScrollPos32(int nBar, BOOL bGetTrackPos  = FALSE );
  45. BOOL SetScrollPos32(int nBar, int nPos, BOOL bRedraw = TRUE );
  46. int GetScrollPage( int nBar );
  47. //{{AFX_MSG(CCurveButton)
  48. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  49. //}}AFX_MSG
  50. DECLARE_MESSAGE_MAP()
  51. protected:
  52. CAssetSerialContainer m_AssetSerial;
  53. double m_dStartAmount;
  54. int m_nStepWeight;
  55. int m_nHScrollMax;
  56. };
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CSimuReport dialog
  59. /***
  60. 策略报告对话框
  61. */
  62. class CSimuReport : public CDialog
  63. {
  64. // Construction
  65. public:
  66. CSimuReport(CWnd* pParent = NULL);   // standard constructor
  67. ~CSimuReport();
  68. // operation
  69. void SetStrategy( CStrategy * pStrategy );
  70. // Dialog Data
  71. //{{AFX_DATA(CSimuReport)
  72. enum { IDD = IDD_SIMUREPORT };
  73. CButton m_btnOK;
  74. CEdit m_editXiapu;
  75. CEdit m_editYieldStdDev;
  76. CStatic m_staticExplain;
  77. CCurveButton m_curve;
  78. CButton m_btnCopy;
  79. CEdit m_editYieldIndex;
  80. CEdit m_editYieldFin;
  81. CEdit m_editYieldMin;
  82. CEdit m_editYieldMax;
  83. CEdit m_editVictoryTimes;
  84. CEdit m_editBuyTimes;
  85. CReportListCtrl m_listOpRecord;
  86. CReportListCtrl m_listStockOwn;
  87. CTabCtrl m_tabctrl;
  88. //}}AFX_DATA
  89. protected:
  90. CStrategy * m_pStrategy;
  91. BOOL SetResults( );
  92. // Overrides
  93. // ClassWizard generate virtual function overrides
  94. //{{AFX_VIRTUAL(CSimuReport)
  95. protected:
  96. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  97. //}}AFX_VIRTUAL
  98. // Implementation
  99. protected:
  100. // Generated message map functions
  101. //{{AFX_MSG(CSimuReport)
  102. virtual BOOL OnInitDialog();
  103. afx_msg void OnSelchangeTabctrl(NMHDR* pNMHDR, LRESULT* pResult);
  104. afx_msg void OnCopy();
  105. //}}AFX_MSG
  106. DECLARE_MESSAGE_MAP()
  107. };
  108. //{{AFX_INSERT_LOCATION}}
  109. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  110. #endif // !defined(AFX_SIMUREPORT_H__4E52BCB0_344B_439E_90DB_CAB43552CA6D__INCLUDED_)