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

金融证券系统

开发平台:

Visual C++

  1. #if !defined(AFX_SETGROUPDLG_H__28A5314F_FA8C_4F1F_A80C_6803B63D2340__INCLUDED_)
  2. #define AFX_SETGROUPDLG_H__28A5314F_FA8C_4F1F_A80C_6803B63D2340__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // SetGroupDlg.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CDomainComboBox window
  10. /***
  11. 显示板块或分组的ComboBox
  12. */
  13. class CDomainComboBox : public CComboBox
  14. {
  15. // Construction
  16. public:
  17. CDomainComboBox();
  18. // Operations
  19. public:
  20. int InitStrings( BOOL bHasClass, BOOL bHasDomain, CDomainContainer &groups );
  21. int AddGroup( CString strGroup );
  22. BOOL DeleteCurSel( );
  23. int GetCurSelType( );
  24. CString GetCurSelName( );
  25. BOOL SelectGroupAll( );
  26. // Overrides
  27. // ClassWizard generated virtual function overrides
  28. //{{AFX_VIRTUAL(CDomainComboBox)
  29. public:
  30. //}}AFX_VIRTUAL
  31. // Implementation
  32. public:
  33. virtual ~CDomainComboBox();
  34. // Generated message map functions
  35. protected:
  36. //{{AFX_MSG(CDomainComboBox)
  37. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  38. //}}AFX_MSG
  39. DECLARE_MESSAGE_MAP()
  40. };
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CDomainListBox window
  43. /***
  44. 显示板块或分组的股票的ListBox
  45. */
  46. class CDomainListBox : public CListBox
  47. {
  48. // Construction
  49. public:
  50. CDomainListBox();
  51. // Operations
  52. public:
  53. BOOL SetCurrentStocks( int nType, LPCTSTR lpszDomain, CDomainContainer & groups );
  54. BOOL SelectCode( int nStart, CString strText );
  55. BOOL SelectShortname( int nStart, CString strText );
  56. BOOL SelectUp( );
  57. BOOL SelectDown( );
  58. BOOL SelectPrior( );
  59. BOOL SelectNext( );
  60. int GetCountPerPage( );
  61. BOOL SelectAndShowItem( int nSel );
  62. int SelectItem( int nSel, BOOL bSelected = TRUE );
  63. int GetSelected( int nItem );
  64. // Overrides
  65. // ClassWizard generated virtual function overrides
  66. //{{AFX_VIRTUAL(CDomainListBox)
  67. public:
  68. //}}AFX_VIRTUAL
  69. // Implementation
  70. public:
  71. virtual ~CDomainListBox();
  72. // Generated message map functions
  73. protected:
  74. //{{AFX_MSG(CDomainListBox)
  75. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  76. //}}AFX_MSG
  77. DECLARE_MESSAGE_MAP()
  78. };
  79. /////////////////////////////////////////////////////////////////////////////
  80. // CSetGroupDlg dialog
  81. /***
  82. 设置分组的对话框
  83. */
  84. class CSetGroupDlg : public CDialog
  85. {
  86. // Construction
  87. public:
  88. CSetGroupDlg(CWnd* pParent = NULL);   // standard constructor
  89. void SetInitialGroup( CString strGroupName );
  90. void AddtoGroup( CSPStringArray & astrStocks );
  91. // Dialog Data
  92. //{{AFX_DATA(CSetGroupDlg)
  93. enum { IDD = IDD_SETGROUP };
  94. CButton m_btnCancel;
  95. CButton m_btnOK;
  96. CStatic m_staticInfo;
  97. CButton m_btnRemoveAll;
  98. CButton m_btnRemoveSelected;
  99. CButton m_btnAddAll;
  100. CButton m_btnAddSelected;
  101. CButton m_btnDeleteGroup;
  102. CButton m_btnAddGroup;
  103. CDomainListBox m_listStockDest;
  104. CDomainComboBox m_comboGroupDest;
  105. CDomainListBox m_listStockSrc;
  106. CDomainComboBox m_comboGroupSrc;
  107. CEdit m_editCode;
  108. //}}AFX_DATA
  109. // Overrides
  110. // ClassWizard generated virtual function overrides
  111. //{{AFX_VIRTUAL(CSetGroupDlg)
  112. public:
  113. virtual BOOL PreTranslateMessage(MSG* pMsg);
  114. protected:
  115. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  116. //}}AFX_VIRTUAL
  117. // Implementation
  118. protected:
  119. CDomainContainer m_grpTemp;
  120. CString m_strInitialGroupName;
  121. CSPStringArray m_astrInitialGroupStocks;
  122. // Generated message map functions
  123. //{{AFX_MSG(CSetGroupDlg)
  124. virtual BOOL OnInitDialog();
  125. afx_msg void OnAddgroup();
  126. afx_msg void OnDeletegroup();
  127. afx_msg void OnAddselected();
  128. afx_msg void OnAddall();
  129. afx_msg void OnRemoveselected();
  130. afx_msg void OnRemoveall();
  131. afx_msg void OnChangeEditcode();
  132. afx_msg void OnSelchangeComboGroupsrc();
  133. afx_msg void OnSelchangeComboGroupdest();
  134. virtual void OnOK();
  135. virtual void OnCancel();
  136. afx_msg void OnDblclkListStocksrc();
  137. afx_msg void OnDblclkListStockdest();
  138. //}}AFX_MSG
  139. DECLARE_MESSAGE_MAP()
  140. };
  141. //{{AFX_INSERT_LOCATION}}
  142. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  143. #endif // !defined(AFX_SETGROUPDLG_H__28A5314F_FA8C_4F1F_A80C_6803B63D2340__INCLUDED_)