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.

231 lines
6.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: I S D N P A G E . H
  7. //
  8. // Contents: Isdn property page for Net Adapters
  9. //
  10. // Notes:
  11. //
  12. // Author: BillBe 9 Sep 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "isdncfg.h"
  17. #include <ncxbase.h>
  18. #include "ncatlps.h"
  19. #include "resource.h"
  20. class CIsdnPage: public CPropSheetPage
  21. {
  22. public:
  23. BEGIN_MSG_MAP(CIsdnPage)
  24. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  25. NOTIFY_CODE_HANDLER(PSN_APPLY, OnApply)
  26. COMMAND_ID_HANDLER(IDC_CMB_SwitchType, OnSwitchType)
  27. COMMAND_ID_HANDLER(IDC_PSB_Configure, OnConfigure)
  28. MESSAGE_HANDLER(WM_HELP, OnHelp)
  29. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
  30. END_MSG_MAP()
  31. CIsdnPage ();
  32. ~CIsdnPage();
  33. VOID DestroyPageCallbackHandler()
  34. {
  35. delete this;
  36. }
  37. HPROPSHEETPAGE
  38. CreatePage(HDEVINFO hdi, PSP_DEVINFO_DATA pdeid);
  39. // ATL message handlers
  40. LRESULT
  41. OnApply(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  42. LRESULT
  43. OnConfigure(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  44. LRESULT
  45. OnSwitchType(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  46. LRESULT
  47. OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  48. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  49. LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  50. VOID EnableDisableConfigure ();
  51. private:
  52. BOOL m_fDirty;
  53. HKEY m_hkeyDriver;
  54. HDEVINFO m_hdi;
  55. PSP_DEVINFO_DATA m_pdeid;
  56. PISDN_CONFIG_INFO m_pisdnci;
  57. VOID DoSpidsDlg(VOID);
  58. VOID DoJapanDlg(VOID);
  59. VOID DoEazDlg(VOID);
  60. VOID DoMsnDlg(VOID);
  61. };
  62. //
  63. // SPIDS dialog
  64. //
  65. class CSpidsDlg : public CDialogImpl<CSpidsDlg>
  66. {
  67. public:
  68. BEGIN_MSG_MAP(CSpidsDlg)
  69. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  70. COMMAND_ID_HANDLER(IDOK, OnOk)
  71. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  72. COMMAND_ID_HANDLER(IDC_LBX_Variant, OnSelChange)
  73. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  74. MESSAGE_HANDLER(WM_HELP, OnHelp)
  75. END_MSG_MAP()
  76. enum {IDD = IDD_ISDN_SPIDS};
  77. CSpidsDlg(PISDN_CONFIG_INFO pisdnci)
  78. {
  79. m_pisdnci = pisdnci;
  80. }
  81. ~CSpidsDlg() {};
  82. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  83. BOOL& bHandled);
  84. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  85. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  86. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  87. BOOL& bHandled);
  88. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  89. private:
  90. PISDN_CONFIG_INFO m_pisdnci;
  91. };
  92. //
  93. // EAZ Dialog
  94. //
  95. class CEazDlg : public CDialogImpl<CEazDlg>
  96. {
  97. public:
  98. BEGIN_MSG_MAP(CEazDlg)
  99. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  100. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  101. COMMAND_ID_HANDLER(IDOK, OnOk)
  102. COMMAND_ID_HANDLER(IDC_LBX_Variant, OnSelChange)
  103. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  104. MESSAGE_HANDLER(WM_HELP, OnHelp)
  105. END_MSG_MAP()
  106. enum {IDD = IDD_ISDN_EAZ};
  107. CEazDlg(PISDN_CONFIG_INFO pisdnci)
  108. {
  109. m_pisdnci = pisdnci;
  110. }
  111. ~CEazDlg() {};
  112. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  113. BOOL& bHandled);
  114. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  115. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  116. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  117. BOOL& bHandled);
  118. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  119. private:
  120. PISDN_CONFIG_INFO m_pisdnci;
  121. };
  122. //
  123. // Multi-subscriber number dialog
  124. //
  125. class CMsnDlg : public CDialogImpl<CMsnDlg>
  126. {
  127. public:
  128. BEGIN_MSG_MAP(CMsnDlg)
  129. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  130. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  131. COMMAND_ID_HANDLER(IDOK, OnOk)
  132. COMMAND_ID_HANDLER(IDC_PSB_ADD, OnAdd)
  133. COMMAND_ID_HANDLER(IDC_PSB_REMOVE, OnRemove)
  134. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  135. COMMAND_CODE_HANDLER(EN_CHANGE, OnChange)
  136. MESSAGE_HANDLER(WM_HELP, OnHelp)
  137. END_MSG_MAP()
  138. enum {IDD = IDD_ISDN_MSN};
  139. CMsnDlg(PISDN_CONFIG_INFO pisdnci)
  140. {
  141. m_pisdnci = pisdnci;
  142. m_iItemOld = 0;
  143. }
  144. ~CMsnDlg() {};
  145. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  146. BOOL& bHandled);
  147. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  148. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  149. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  150. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  151. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  152. BOOL& bHandled);
  153. LRESULT OnChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  154. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  155. private:
  156. PISDN_CONFIG_INFO m_pisdnci;
  157. INT m_iItemOld;
  158. };
  159. //
  160. // Logical terminal dialog
  161. //
  162. class CJapanDlg : public CDialogImpl<CJapanDlg>
  163. {
  164. public:
  165. BEGIN_MSG_MAP(CJapanDlg)
  166. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  167. COMMAND_ID_HANDLER(IDOK, OnOk)
  168. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  169. COMMAND_ID_HANDLER(IDC_LBX_Variant, OnSelChange)
  170. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  171. MESSAGE_HANDLER(WM_HELP, OnHelp)
  172. END_MSG_MAP()
  173. enum {IDD = IDD_ISDN_JAPAN};
  174. CJapanDlg(PISDN_CONFIG_INFO pisdnci)
  175. {
  176. m_pisdnci = pisdnci;
  177. }
  178. ~CJapanDlg() {};
  179. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  180. BOOL& bHandled);
  181. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  182. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  183. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  184. BOOL& bHandled);
  185. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  186. private:
  187. PISDN_CONFIG_INFO m_pisdnci;
  188. };
  189. const WCHAR c_szIsdnHelpFile[] = L"devmgr.hlp";