Source code of Windows XP (NT5)
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.

120 lines
3.0 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corporation, 1991 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. dlgdval.h
  7. default values dialog
  8. FILE HISTORY:
  9. */
  10. #ifndef _DLGDVAL_H
  11. #define _DLGDVAL_H
  12. #ifndef _SCOPE_H
  13. #include "scope.h"
  14. #endif
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CDhcpDefValDlg dialog
  17. class CDhcpDefValDlg : public CBaseDialog
  18. {
  19. private:
  20. int m_combo_class_iSel;
  21. int m_combo_name_iSel;
  22. SPITFSNode m_spNode;
  23. // Construction
  24. public:
  25. CDhcpDefValDlg(ITFSNode * pServerNode,
  26. COptionList * polTypes,
  27. CWnd* pParent = NULL); // standard constructor
  28. ~ CDhcpDefValDlg () ;
  29. // Dialog Data
  30. //{{AFX_DATA(CDhcpDefValDlg)
  31. enum { IDD = IDD_DEFAULT_VALUE };
  32. CEdit m_edit_comment;
  33. CButton m_butn_edit_value;
  34. CStatic m_static_value_desc;
  35. CEdit m_edit_string;
  36. CEdit m_edit_num;
  37. CEdit m_edit_array;
  38. CComboBox m_combo_name;
  39. CComboBox m_combo_class;
  40. CButton m_butn_prop;
  41. CButton m_butn_new;
  42. CButton m_butn_delete;
  43. //}}AFX_DATA
  44. CWndIpAddress m_ipa_value ; // IP Address control
  45. // Implementation
  46. // Return TRUE if the lists were fiddled during execution
  47. BOOL QueryDirty ()
  48. { return m_b_dirty ; }
  49. void GetCurrentVendor(CString & strVendor);
  50. // Context Help Support
  51. virtual DWORD * GetHelpMap() { return DhcpGetHelpMap(CDhcpDefValDlg::IDD); }
  52. protected:
  53. // The current list of types and values
  54. COptionList * m_pol_values ;
  55. // list of new options - only used to clear new options on cancel
  56. COptionList m_ol_values_new ;
  57. // The list of deleted type/values
  58. COptionList m_ol_values_defunct ;
  59. // Pointer to type being displayed
  60. CDhcpOption * m_p_edit_type ;
  61. // TRUE if lists have been fiddled.
  62. BOOL m_b_dirty ;
  63. // Check the state of the controls
  64. void HandleActivation ( BOOL bForce = FALSE ) ;
  65. // Fill the combo boxe(s)
  66. void Fill () ;
  67. // Given the listbox index, get a pointer to the option
  68. CDhcpOption * GetOptionTypeByIndex ( int iSel );
  69. // Handle edited data
  70. BOOL HandleValueEdit () ;
  71. LONG UpdateList ( CDhcpOption * pdhcType, BOOL bNew ) ;
  72. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  73. // Generated message map functions
  74. //{{AFX_MSG(CDhcpDefValDlg)
  75. afx_msg void OnClickedButnDelete();
  76. afx_msg void OnClickedButnNewOption();
  77. afx_msg void OnClickedButnOptionPro();
  78. afx_msg void OnSelendokComboOptionClass();
  79. afx_msg void OnSetfocusComboOptionClass();
  80. afx_msg void OnSetfocusComboOptionName();
  81. afx_msg void OnSelchangeComboOptionName();
  82. virtual void OnCancel();
  83. virtual void OnOK();
  84. afx_msg void OnClickedButnValue();
  85. afx_msg void OnClickedHelp();
  86. virtual BOOL OnInitDialog();
  87. //}}AFX_MSG
  88. DECLARE_MESSAGE_MAP()
  89. };
  90. #endif _DLGDVAL_H