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.

112 lines
4.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : dlgNewRule.h //
  3. // //
  4. // DESCRIPTION : Header file for the CDlgNewFaxOutboundRule class. //
  5. // The class implement the dialog for new Device. //
  6. // //
  7. // AUTHOR : yossg //
  8. // //
  9. // HISTORY : //
  10. // Dec 30 1999 yossg Create //
  11. // Jan 25 2000 yossg Change the Dialog Design //
  12. // Oct 17 2000 yossg //
  13. // //
  14. // Copyright (C) 1999 - 2000 Microsoft Corporation All Rights Reserved //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #ifndef DLGNEWOUTRULE_H_INCLUDED
  17. #define DLGNEWOUTRULE_H_INCLUDED
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CDlgNewFaxOutboundRule
  20. class CFaxServer;
  21. class CDlgNewFaxOutboundRule :
  22. public CDialogImpl<CDlgNewFaxOutboundRule>
  23. {
  24. public:
  25. CDlgNewFaxOutboundRule(CFaxServer * pFaxServer);
  26. ~CDlgNewFaxOutboundRule();
  27. enum { IDD = IDD_DLGNEWRULE };
  28. BEGIN_MSG_MAP(CDlgNewFaxOutboundRule)
  29. MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
  30. COMMAND_ID_HANDLER(IDOK, OnOK)
  31. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  32. COMMAND_HANDLER(IDC_RULE_AREACODE_EDIT, EN_CHANGE, OnTextChanged)
  33. COMMAND_HANDLER(IDC_COUNTRY_RADIO, BN_CLICKED, OnRuleTypeRadioClicked)
  34. COMMAND_HANDLER(IDC_AREA_RADIO, BN_CLICKED, OnRuleTypeRadioClicked)
  35. COMMAND_HANDLER(IDC_DESTINATION_RADIO1, BN_CLICKED, OnDestenationRadioClicked)
  36. COMMAND_HANDLER(IDC_DESTINATION_RADIO2, BN_CLICKED, OnDestenationRadioClicked)
  37. COMMAND_HANDLER(IDC_NEWRULE_COUNTRYCODE_EDIT, EN_CHANGE, OnTextChanged)
  38. COMMAND_HANDLER(IDC_NEWRULE_SELECT_BUTTON, BN_CLICKED, OnSelectCountryCodeClicked)
  39. COMMAND_HANDLER(IDC_DEVICES4RULE_COMBO, CBN_SELCHANGE, OnComboChanged)
  40. COMMAND_HANDLER(IDC_GROUP4RULE_COMBO, CBN_SELCHANGE, OnComboChanged)
  41. MESSAGE_HANDLER( WM_CONTEXTMENU, OnHelpRequest)
  42. MESSAGE_HANDLER( WM_HELP, OnHelpRequest)
  43. END_MSG_MAP()
  44. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  45. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  46. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  47. LRESULT OnTextChanged (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  48. LRESULT OnComboChanged (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  49. LRESULT OnDestenationRadioClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  50. LRESULT OnRuleTypeRadioClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  51. LRESULT OnSelectCountryCodeClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  52. //
  53. // Help
  54. //
  55. LRESULT OnHelpRequest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  56. HRESULT InitRuleDlg();
  57. private:
  58. //
  59. // Methods
  60. //
  61. VOID EnableOK(BOOL fEnable);
  62. BOOL AllReadyToApply(BOOL fSilent);
  63. //
  64. // Members
  65. //
  66. CFaxServer * m_pFaxServer;
  67. PFAX_PORT_INFO_EX m_pFaxDevicesConfig;
  68. DWORD m_dwNumOfDevices;
  69. PFAX_OUTBOUND_ROUTING_GROUP m_pFaxGroupsConfig;
  70. DWORD m_dwNumOfGroups;
  71. BOOL m_fAllReadyToApply;
  72. //
  73. // misc members
  74. //
  75. CComBSTR m_buf;
  76. //
  77. // Controls
  78. //
  79. CEdit m_CountryCodeEdit;
  80. CEdit m_AreaCodeEdit;
  81. CComboBox m_DeviceCombo;
  82. CComboBox m_GroupCombo;
  83. };
  84. #endif // DLGNEWOUTRULE_H_INCLUDED