Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.6 KiB

  1. #if !defined(AFX_COLUMNSELECTDLG_H__12FC80A8_741C_4589_AC4B_01F72CBAECE9__INCLUDED_)
  2. #define AFX_COLUMNSELECTDLG_H__12FC80A8_741C_4589_AC4B_01F72CBAECE9__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ColumnSelectDlg.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CColumnSelectDlg dialog
  10. class CColumnSelectDlg : public CFaxClientDlg
  11. {
  12. // Construction
  13. public:
  14. CColumnSelectDlg(const CString* pcstrTitles, int* pnOrderedItems,
  15. DWORD dwListSize, DWORD& dwSelectedItems, CWnd* pParent = NULL);
  16. //
  17. // set resource string resource IDs
  18. //
  19. void SetStrings
  20. (
  21. int nCaptionId, // dialog caption resource ID
  22. int nAvailableId = -1, // Available box title resource ID
  23. int nDisplayedId = -1 // Displayed box title resource ID
  24. )
  25. {
  26. m_nCaptionId = nCaptionId;
  27. m_nAvailableId = nAvailableId;
  28. m_nDisplayedId = nDisplayedId;
  29. }
  30. // Dialog Data
  31. //{{AFX_DATA(CColumnSelectDlg)
  32. enum { IDD = IDD_COLUMN_SELECT };
  33. CButton m_butOk;
  34. CButton m_groupAvailable;
  35. CButton m_groupDisplayed;
  36. CButton m_butAdd;
  37. CButton m_butRemove;
  38. CButton m_butUp;
  39. CButton m_butDown;
  40. CListBox m_ListCtrlDisplayed;
  41. CListBox m_ListCtrlAvailable;
  42. //}}AFX_DATA
  43. // Overrides
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CColumnSelectDlg)
  46. protected:
  47. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  48. //}}AFX_VIRTUAL
  49. // Implementation
  50. protected:
  51. // Generated message map functions
  52. //{{AFX_MSG(CColumnSelectDlg)
  53. virtual void OnOK();
  54. afx_msg void OnButDown();
  55. afx_msg void OnButUp();
  56. afx_msg void OnButRemove();
  57. afx_msg void OnButAdd();
  58. virtual BOOL OnInitDialog();
  59. afx_msg void OnSelChangeListAvailable();
  60. afx_msg void OnSelChangeListDisplayed();
  61. afx_msg void OnDblclkListAvailable();
  62. afx_msg void OnDblclkListDisplayed();
  63. //}}AFX_MSG
  64. DECLARE_MESSAGE_MAP()
  65. private:
  66. const CString* m_pcstrTitles;
  67. int* m_pnOrderedItems;
  68. const DWORD m_dwListSize;
  69. DWORD& m_rdwSelectedItems;
  70. int m_nCaptionId;
  71. int m_nAvailableId;
  72. int m_nDisplayedId;
  73. private:
  74. BOOL InputValidate();
  75. void MoveSelectedItems(CListBox& listFrom, CListBox& listTo);
  76. void MoveItemVertical(int nStep);
  77. BOOL AddStrToList(CListBox& listBox, DWORD dwItemId);
  78. BOOL SetWndCaption(CWnd* pWnd, int nResId);
  79. void CalcButtonsState();
  80. };
  81. //{{AFX_INSERT_LOCATION}}
  82. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  83. #endif // !defined(AFX_COLUMNSELECTDLG_H__12FC80A8_741C_4589_AC4B_01F72CBAECE9__INCLUDED_)