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

金融证券系统

开发平台:

Visual C++

  1. // RealTimeView.h : interface of the CRealTimeView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_REALTIMEVIEW_H__0A8D66A9_30E0_4AAA_8E17_06B721FC0E97__INCLUDED_)
  5. #define AFX_REALTIMEVIEW_H__0A8D66A9_30E0_4AAA_8E17_06B721FC0E97__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "RealTime.h"
  10. #define RTV_MAX_MULTICOUNT 9 // 最多定义为9
  11. /***
  12. 实时行情视图(分时行情)
  13. */
  14. class CRealTimeView : public CView
  15. {
  16. protected: // create from serialization only
  17. CRealTimeView();
  18. DECLARE_DYNCREATE(CRealTimeView)
  19. // Attributes
  20. int m_nMultiStockCount; // 多股同列,股数
  21. CRealTime m_realtime[RTV_MAX_MULTICOUNT]; // 多股同列
  22. public:
  23. inline virtual CStaticDoc* GetDocument()   { return (CStaticDoc *)m_pDocument; }
  24. CGuiTabPowerPoint m_wndReportTab;
  25. // Operations
  26. public:
  27. void ShowMultiStock( int nMultiStockCount );
  28. int GetShowMultiStock( ) { return m_nMultiStockCount; }
  29. void ChangeDrawMode( int nDrawMode );
  30. void ToggleDrawTechLine( int nTechLine );
  31. int GetDrawMode( ) { return m_realtime[0].GetDrawMode(); }
  32. int GetDrawTechLine() { return m_realtime[0].GetDrawTechLine(); }
  33. void SendRequestQuote( BOOL bForced );
  34. // Overrides
  35. // ClassWizard generated virtual function overrides
  36. //{{AFX_VIRTUAL(CRealTimeView)
  37. public:
  38. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  39. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  40. virtual void OnInitialUpdate();
  41. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  42. protected:
  43. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  44. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  45. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  46. virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  47. virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  48. //}}AFX_VIRTUAL
  49. // Implementation
  50. public:
  51. virtual ~CRealTimeView();
  52. #ifdef _DEBUG
  53. virtual void AssertValid() const;
  54. virtual void Dump(CDumpContext& dc) const;
  55. #endif
  56. protected:
  57. void RedrawAll( CDC * pDC, CRect rectClient );
  58. // Generated message map functions
  59. protected:
  60. //{{AFX_MSG(CRealTimeView)
  61. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  62. afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
  63. afx_msg void OnDestroy();
  64. afx_msg void OnTimer(UINT nIDEvent);
  65. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  66. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  67. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  68. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  69. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  70. afx_msg void OnRealtimePrev();
  71. afx_msg void OnRealtimeNext();
  72. afx_msg void OnRealtimeLeft();
  73. afx_msg void OnRealtimeRight();
  74. afx_msg void OnRealtimeUp();
  75. afx_msg void OnRealtimeDown();
  76. afx_msg void OnRealtimeHome();
  77. afx_msg void OnRealtimeEnd();
  78. afx_msg void OnSelchangeReporttab(NMHDR* pNMHDR, LRESULT* pResult);
  79. //}}AFX_MSG
  80. afx_msg LRESULT OnGetViewTitle( WPARAM wParam, LPARAM lParam );
  81. afx_msg LRESULT OnGetViewCmdid( WPARAM wParam, LPARAM lParam );
  82. afx_msg LRESULT OnColorChange( WPARAM wParam, LPARAM lParam );
  83. afx_msg LRESULT OnStkReceiverData( WPARAM wParam, LPARAM lParam );
  84. DECLARE_MESSAGE_MAP()
  85. };
  86. /////////////////////////////////////////////////////////////////////////////
  87. //{{AFX_INSERT_LOCATION}}
  88. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  89. #endif // !defined(AFX_REALTIMEVIEW_H__0A8D66A9_30E0_4AAA_8E17_06B721FC0E97__INCLUDED_)