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.

146 lines
5.4 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : ppFaxOutboundRoutingRule.h //
  3. // //
  4. // DESCRIPTION : Fax Server Outbound routing rule prop page header file //
  5. // //
  6. // AUTHOR : yossg //
  7. // //
  8. // HISTORY : //
  9. // Jan 9 2000 yossg Created //
  10. // Jan 25 2000 yossg Change the Dialog Design //
  11. // //
  12. // Copyright (C) 1999 - 2000 Microsoft Corporation All Rights Reserved //
  13. /////////////////////////////////////////////////////////////////////////////
  14. #ifndef _PP_FAXOUTBOUNDROUTINGRULE_H_
  15. #define _PP_FAXOUTBOUNDROUTINGRULE_H_
  16. #include "OutboundRule.h"
  17. #include "proppageex.h"
  18. class CFaxOutboundRoutingRuleNode;
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CppFaxOutboundRoutingRule dialog
  21. class CppFaxOutboundRoutingRule : public CPropertyPageExImpl<CppFaxOutboundRoutingRule>
  22. {
  23. public:
  24. //
  25. // Constructor
  26. //
  27. CppFaxOutboundRoutingRule(
  28. LONG_PTR hNotificationHandle,
  29. CSnapInItem *pNode,
  30. BOOL bOwnsNotificationHandle,
  31. HINSTANCE hInst);
  32. //
  33. // Destructor
  34. //
  35. ~CppFaxOutboundRoutingRule();
  36. enum { IDD = IDD_FAXOUTRULE_GENERAL };
  37. BEGIN_MSG_MAP(CppFaxOutboundRoutingRule)
  38. MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
  39. COMMAND_HANDLER(IDC_RULE_AREACODE_EDIT1, EN_CHANGE, OnTextChanged)
  40. COMMAND_HANDLER(IDC_COUNTRY_RADIO1, BN_CLICKED, OnRuleTypeRadioClicked)
  41. COMMAND_HANDLER(IDC_AREA_RADIO1, BN_CLICKED, OnRuleTypeRadioClicked)
  42. COMMAND_HANDLER(IDC_DESTINATION_RADIO11, BN_CLICKED, OnDestenationRadioClicked)
  43. COMMAND_HANDLER(IDC_DESTINATION_RADIO21, BN_CLICKED, OnDestenationRadioClicked)
  44. COMMAND_HANDLER(IDC_RULE_COUNTRYCODE_EDIT1, EN_CHANGE, OnTextChanged)
  45. COMMAND_HANDLER(IDC_RULE_SELECT_BUTTON1, BN_CLICKED, OnSelectCountryCodeClicked)
  46. COMMAND_HANDLER(IDC_DEVICES4RULE_COMBO1, CBN_SELCHANGE, OnComboChanged)
  47. COMMAND_HANDLER(IDC_GROUP4RULE_COMBO1, CBN_SELCHANGE, OnComboChanged)
  48. MESSAGE_HANDLER( WM_CONTEXTMENU, OnHelpRequest)
  49. MESSAGE_HANDLER( WM_HELP, OnHelpRequest)
  50. CHAIN_MSG_MAP(CSnapInPropertyPageImpl<CppFaxOutboundRoutingRule>)
  51. END_MSG_MAP()
  52. LRESULT OnInitDialog( UINT uiMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled );
  53. BOOL OnApply();
  54. LRESULT OnTextChanged (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  55. LRESULT OnComboChanged (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  56. LRESULT OnDestenationRadioClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  57. LRESULT OnRuleTypeRadioClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  58. LRESULT OnSelectCountryCodeClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  59. HRESULT InitFaxRulePP (CFaxOutboundRoutingRuleNode * pParentNode);
  60. HRESULT SetProps(int *pCtrlFocus);
  61. HRESULT PreApply(int *pCtrlFocus);
  62. private:
  63. //
  64. // Handles
  65. //
  66. CFaxOutboundRoutingRuleNode * m_pParentNode;
  67. LONG_PTR m_lpNotifyHandle;
  68. //
  69. // Methods
  70. //
  71. LRESULT SetApplyButton (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  72. BOOL AllReadyToApply(BOOL fSilent);
  73. HRESULT FaxConfigureRule(BOOL fNewUseGroup, DWORD dwNewDeviceID, LPCTSTR lpctstrNewGroupName);
  74. HRESULT FaxReplaceRule(DWORD dwNewAreaCode, DWORD dwNewCountryCode, BOOL fNewUseGroup,
  75. DWORD dwNewDeviceID, LPCTSTR lpctstrNewGroupName);
  76. //
  77. // List members
  78. //
  79. PFAX_PORT_INFO_EX m_pFaxDevicesConfig;
  80. DWORD m_dwNumOfDevices;
  81. PFAX_OUTBOUND_ROUTING_GROUP m_pFaxGroupsConfig;
  82. DWORD m_dwNumOfGroups;
  83. //
  84. // Initial state members
  85. //
  86. DWORD m_dwCountryCode;
  87. DWORD m_dwAreaCode;
  88. DWORD m_dwDeviceID;
  89. CComBSTR m_bstrGroupName;
  90. BOOL m_fIsGroup;
  91. //
  92. // misc members
  93. //
  94. CComBSTR m_buf;
  95. BOOL m_fAllReadyToApply;
  96. BOOL m_fIsDialogInitiated;
  97. BOOL m_fIsDirty;
  98. //
  99. // Controls
  100. //
  101. CEdit m_CountryCodeEdit;
  102. CEdit m_AreaCodeEdit;
  103. CComboBox m_DeviceCombo;
  104. CComboBox m_GroupCombo;
  105. //
  106. // Help
  107. //
  108. LRESULT OnHelpRequest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  109. };
  110. #endif // _PP_FAXOUTBOUNDROUTINGRULE_H_