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

金融证券系统

开发平台:

Visual C++

  1. // SListView.h : interface of the CSListView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_SLISTVIEW_H__579B4821_52B1_4009_BB3B_590A4D06C998__INCLUDED_)
  5. #define AFX_SLISTVIEW_H__579B4821_52B1_4009_BB3B_590A4D06C998__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "GridCtrl/GridCtrl.h"
  10. class CStaticDoc;
  11. class CListExportDlg;
  12. /***
  13. 股票列表视图
  14. */
  15. class CSListView : public CFormView
  16. {
  17. protected: // create from serialization only
  18. CSListView();
  19. DECLARE_DYNCREATE(CSListView)
  20. public:
  21. //{{AFX_DATA(CSListView)
  22. enum { IDD = IDD_SLIST_FORM };
  23. //}}AFX_DATA
  24. CGuiWorkTab m_wndWorkTab;
  25. // Attributes
  26. public:
  27. inline virtual CStaticDoc* GetDocument()   { return (CStaticDoc *)m_pDocument; }
  28. void SetFont( LPLOGFONT pLogFont );
  29. // Operations
  30. public:
  31. void GetSelectedStocks( CSPStringArray & astr );
  32. void ExportList( CListExportDlg * pDlg );
  33. void RemoveSortSign( );
  34. void SetSortSign( );
  35. void SetSortVariant( UINT nVariant );
  36. virtual void SetCurrentStatus( int nType, LPCTSTR lpszDomain, DWORD dwDate );
  37. void StoreColumnOrderArray( );
  38. virtual void ResetColumns( );
  39. BOOL SetAverageItem( CGridCtrl &grid, CStockContainer &container, BOOL bRedraw );
  40. void OnDblclkItem( int nStockIndex );
  41. // 行情刷新
  42. void StockInfoChanged( LONG id, CStockInfo & info );
  43. void SendRequestQuote( BOOL bForced );
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(CSListView)
  47. public:
  48. virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  49. virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  50. virtual BOOL PreTranslateMessage(MSG* pMsg);
  51. protected:
  52. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  53. virtual void OnInitialUpdate(); // called first time after construct
  54. virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  55. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  56. //}}AFX_VIRTUAL
  57. // Implementation
  58. public:
  59. virtual ~CSListView();
  60. #ifdef _DEBUG
  61. virtual void AssertValid() const;
  62. virtual void Dump(CDumpContext& dc) const;
  63. #endif
  64. protected:
  65. // Grid
  66. CGridCtrl m_Grid;
  67. // attributes
  68. int m_nColSort;
  69. BOOL m_bSortAscend;
  70. BOOL m_bShouldUpdate;
  71. BOOL m_bFirstUpdate;
  72. // operation
  73. // Generated message map functions
  74. protected:
  75. //{{AFX_MSG(CSListView)
  76. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  77. afx_msg void OnDestroy();
  78. afx_msg void OnTimer(UINT nIDEvent);
  79. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  80. afx_msg void OnSlistExportlist();
  81. afx_msg void OnSize(UINT nType, int cx, int cy);
  82. afx_msg void OnSetFocus(CWnd* pOldWnd);
  83. afx_msg void OnUpdateFilePrint(CCmdUI* pCmdUI);
  84. afx_msg void OnSelchangeWorktab(NMHDR* pNMHDR, LRESULT* pResult);
  85. //}}AFX_MSG
  86. afx_msg LRESULT OnGetViewTitle( WPARAM wParam, LPARAM lParam );
  87. afx_msg LRESULT OnGetViewCmdid( WPARAM wParam, LPARAM lParam );
  88. afx_msg LRESULT OnColorChange( WPARAM wParam, LPARAM lParam );
  89. afx_msg LRESULT OnStkReceiverData( WPARAM wParam, LPARAM lParam );
  90. DECLARE_MESSAGE_MAP()
  91. };
  92. /////////////////////////////////////////////////////////////////////////////
  93. //{{AFX_INSERT_LOCATION}}
  94. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  95. #endif // !defined(AFX_SLISTVIEW_H__579B4821_52B1_4009_BB3B_590A4D06C998__INCLUDED_)