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.

142 lines
4.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : ppFaxDeviceGeneral.h //
  3. // //
  4. // DESCRIPTION : Fax Server Inbox prop page header file //
  5. // //
  6. // AUTHOR : yossg //
  7. // //
  8. // HISTORY : //
  9. // Oct 27 1999 yossg Created //
  10. // Nov 3 1999 yossg OnInitDialog, SetProps //
  11. // Nov 15 1999 yossg Call RPC func //
  12. // Windows XP //
  13. // Feb 14 2001 yossg Add Manual Receive support //
  14. // //
  15. // Copyright (C) 1999 Microsoft Corporation All Rights Reserved //
  16. /////////////////////////////////////////////////////////////////////////////
  17. #ifndef _PP_FAXDEVICE_GENERAL_H_
  18. #define _PP_FAXDEVICE_GENERAL_H_
  19. #include "MyCtrls.h"
  20. #include <proppageex.h>
  21. //#include <windows.h>
  22. class CFaxServer;
  23. class CFaxServerNode;
  24. class CFaxDeviceNode;
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CppFaxDeviceGeneral dialog
  27. class CppFaxDeviceGeneral : public CPropertyPageExImpl<CppFaxDeviceGeneral>
  28. {
  29. public:
  30. //
  31. // Constructor
  32. //
  33. CppFaxDeviceGeneral(
  34. LONG_PTR hNotificationHandle,
  35. CSnapInItem *pNode,
  36. CSnapInItem *pParentNode,
  37. DWORD dwDeviceID,
  38. HINSTANCE hInst);
  39. //
  40. // Destructor
  41. //
  42. ~CppFaxDeviceGeneral();
  43. enum { IDD = IDD_FAXDEVICE_GENERAL };
  44. BEGIN_MSG_MAP(CppFaxDeviceGeneral)
  45. MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
  46. COMMAND_HANDLER( IDC_DEVICE_DESCRIPTION_EDIT,
  47. EN_CHANGE, DeviceTextChanged )
  48. COMMAND_HANDLER( IDC_RECEIVE_CHECK, BN_CLICKED, OnReceiveCheckboxClicked )
  49. COMMAND_HANDLER( IDC_RECEIVE_AUTO_RADIO1 , BN_CLICKED, OnReceiveRadioButtonClicked)
  50. COMMAND_HANDLER( IDC_RECEIVE_MANUAL_RADIO2, BN_CLICKED, OnReceiveRadioButtonClicked)
  51. COMMAND_HANDLER( IDC_DEVICE_RINGS_EDIT, EN_CHANGE, DeviceTextChanged )
  52. COMMAND_HANDLER( IDC_DEVICE_CSID_EDIT, EN_CHANGE, DeviceTextChanged )
  53. COMMAND_HANDLER( IDC_SEND_CHECK, BN_CLICKED, OnSendCheckboxClicked )
  54. COMMAND_HANDLER( IDC_DEVICE_TSID_EDIT, EN_CHANGE, DeviceTextChanged )
  55. MESSAGE_HANDLER( WM_CONTEXTMENU, OnHelpRequest)
  56. MESSAGE_HANDLER( WM_HELP, OnHelpRequest)
  57. CHAIN_MSG_MAP(CSnapInPropertyPageImpl<CppFaxDeviceGeneral>)
  58. END_MSG_MAP()
  59. //
  60. // Dialog's Handler and events.
  61. //
  62. HRESULT InitRPC( );
  63. LRESULT OnInitDialog( UINT uiMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled );
  64. BOOL OnApply();
  65. HRESULT SetProps(int *pCtrlFocus);
  66. HRESULT PreApply(int *pCtrlFocus);
  67. private:
  68. //
  69. // Control members
  70. //
  71. CEdit m_DescriptionBox;
  72. CEdit m_CSIDBox;
  73. CEdit m_TSIDBox;
  74. CEdit m_RingsBox;
  75. CMyUpDownCtrl m_RingsSpin;
  76. //
  77. // Boolean members
  78. //
  79. BOOL m_fAllReadyToApply;
  80. BOOL m_fIsDialogInitiated;
  81. //
  82. // Config Structure member
  83. //
  84. PFAX_PORT_INFO_EX m_pFaxDeviceConfig;
  85. DWORD m_dwDeviceID;
  86. //
  87. // Handles
  88. //
  89. CFaxDeviceNode * m_pParentNode;
  90. CSnapInItem * m_pGrandParentNode;
  91. LONG_PTR m_lpNotifyHandle;
  92. //
  93. // Event methods
  94. //
  95. LRESULT OnReceiveCheckboxClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  96. LRESULT OnReceiveRadioButtonClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  97. LRESULT OnSendCheckboxClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  98. LRESULT DeviceTextChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  99. BOOL AllReadyToApply(BOOL fSilent);
  100. void EnableRingsControls(BOOL fState);
  101. void EnableReceiveControls(BOOL fState);
  102. //
  103. // Help
  104. //
  105. LRESULT OnHelpRequest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  106. };
  107. #endif // _PP_FAXDEVICE_GENERAL_H_