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.

229 lines
6.4 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. private:
  51. BOOL m_fDirty;
  52. HKEY m_hkeyDriver;
  53. HDEVINFO m_hdi;
  54. PSP_DEVINFO_DATA m_pdeid;
  55. PISDN_CONFIG_INFO m_pisdnci;
  56. VOID DoSpidsDlg(VOID);
  57. VOID DoJapanDlg(VOID);
  58. VOID DoEazDlg(VOID);
  59. VOID DoMsnDlg(VOID);
  60. };
  61. //
  62. // SPIDS dialog
  63. //
  64. class CSpidsDlg : public CDialogImpl<CSpidsDlg>
  65. {
  66. public:
  67. BEGIN_MSG_MAP(CSpidsDlg)
  68. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  69. COMMAND_ID_HANDLER(IDOK, OnOk)
  70. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  71. COMMAND_ID_HANDLER(IDC_LBX_Variant, OnSelChange)
  72. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  73. MESSAGE_HANDLER(WM_HELP, OnHelp)
  74. END_MSG_MAP()
  75. enum {IDD = IDD_ISDN_SPIDS};
  76. CSpidsDlg(PISDN_CONFIG_INFO pisdnci)
  77. {
  78. m_pisdnci = pisdnci;
  79. }
  80. ~CSpidsDlg() {};
  81. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  82. BOOL& bHandled);
  83. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  84. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  85. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  86. BOOL& bHandled);
  87. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  88. private:
  89. PISDN_CONFIG_INFO m_pisdnci;
  90. };
  91. //
  92. // EAZ Dialog
  93. //
  94. class CEazDlg : public CDialogImpl<CEazDlg>
  95. {
  96. public:
  97. BEGIN_MSG_MAP(CEazDlg)
  98. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  99. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  100. COMMAND_ID_HANDLER(IDOK, OnOk)
  101. COMMAND_ID_HANDLER(IDC_LBX_Variant, OnSelChange)
  102. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  103. MESSAGE_HANDLER(WM_HELP, OnHelp)
  104. END_MSG_MAP()
  105. enum {IDD = IDD_ISDN_EAZ};
  106. CEazDlg(PISDN_CONFIG_INFO pisdnci)
  107. {
  108. m_pisdnci = pisdnci;
  109. }
  110. ~CEazDlg() {};
  111. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  112. BOOL& bHandled);
  113. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  114. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  115. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  116. BOOL& bHandled);
  117. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  118. private:
  119. PISDN_CONFIG_INFO m_pisdnci;
  120. };
  121. //
  122. // Multi-subscriber number dialog
  123. //
  124. class CMsnDlg : public CDialogImpl<CMsnDlg>
  125. {
  126. public:
  127. BEGIN_MSG_MAP(CMsnDlg)
  128. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  129. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  130. COMMAND_ID_HANDLER(IDOK, OnOk)
  131. COMMAND_ID_HANDLER(IDC_PSB_ADD, OnAdd)
  132. COMMAND_ID_HANDLER(IDC_PSB_REMOVE, OnRemove)
  133. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  134. COMMAND_CODE_HANDLER(EN_CHANGE, OnChange)
  135. MESSAGE_HANDLER(WM_HELP, OnHelp)
  136. END_MSG_MAP()
  137. enum {IDD = IDD_ISDN_MSN};
  138. CMsnDlg(PISDN_CONFIG_INFO pisdnci)
  139. {
  140. m_pisdnci = pisdnci;
  141. m_iItemOld = 0;
  142. }
  143. ~CMsnDlg() {};
  144. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  145. BOOL& bHandled);
  146. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  147. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  148. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  149. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  150. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  151. BOOL& bHandled);
  152. LRESULT OnChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  153. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  154. private:
  155. PISDN_CONFIG_INFO m_pisdnci;
  156. INT m_iItemOld;
  157. };
  158. //
  159. // Logical terminal dialog
  160. //
  161. class CJapanDlg : public CDialogImpl<CJapanDlg>
  162. {
  163. public:
  164. BEGIN_MSG_MAP(CJapanDlg)
  165. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  166. COMMAND_ID_HANDLER(IDOK, OnOk)
  167. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  168. COMMAND_ID_HANDLER(IDC_LBX_Variant, OnSelChange)
  169. COMMAND_ID_HANDLER(IDC_LBX_Line, OnSelChange)
  170. MESSAGE_HANDLER(WM_HELP, OnHelp)
  171. END_MSG_MAP()
  172. enum {IDD = IDD_ISDN_JAPAN};
  173. CJapanDlg(PISDN_CONFIG_INFO pisdnci)
  174. {
  175. m_pisdnci = pisdnci;
  176. }
  177. ~CJapanDlg() {};
  178. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam,
  179. BOOL& bHandled);
  180. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  181. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  182. LRESULT OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  183. BOOL& bHandled);
  184. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  185. private:
  186. PISDN_CONFIG_INFO m_pisdnci;
  187. };
  188. const WCHAR c_szIsdnHelpFile[] = L"devmgr.hlp";