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.

118 lines
3.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: A L A N E P S H . H
  7. //
  8. // Contents: Dialog box handling for ATM LAN Emulation configuration.
  9. //
  10. // Notes:
  11. //
  12. // Author: v-lcleet 08/10/97
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "alaneobj.h"
  17. void ShowContextHelp(HWND hDlg, UINT uCommand, const DWORD* pdwHelpIDs);
  18. //
  19. // Configuration Dialog
  20. //
  21. class CALanePsh: public CPropSheetPage
  22. {
  23. public:
  24. BEGIN_MSG_MAP(CALanePsh)
  25. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog);
  26. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu);
  27. MESSAGE_HANDLER(WM_HELP, OnHelp);
  28. NOTIFY_CODE_HANDLER(PSN_KILLACTIVE, OnKillActive);
  29. COMMAND_ID_HANDLER(IDC_ELAN_ADD, OnAdd);
  30. COMMAND_ID_HANDLER(IDC_ELAN_EDIT, OnEdit);
  31. COMMAND_ID_HANDLER(IDC_ELAN_REMOVE, OnRemove);
  32. END_MSG_MAP()
  33. CALanePsh(CALaneCfg* palcfg, CALaneCfgAdapterInfo * pAdapter,
  34. const DWORD * adwHelpIDs = NULL);
  35. ~CALanePsh(VOID);
  36. // Message handlers
  37. public:
  38. LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  39. LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  40. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  41. LRESULT OnKillActive(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  42. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  43. LRESULT OnEdit(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  44. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  45. public:
  46. void SendAdapterInfo();
  47. void SendElanInfo();
  48. CALaneCfgElanInfo *GetSelectedElan();
  49. void SetButtons();
  50. int CheckDupElanName();
  51. BOOL m_fEditState;
  52. tstring m_strAddElan;
  53. private:
  54. CALaneCfg* m_palcfg;
  55. CALaneCfgAdapterInfo * m_pAdapterInfo;
  56. const DWORD * m_adwHelpIDs;
  57. HWND m_hElanList;
  58. HWND m_hbtnAdd;
  59. HWND m_hbtnEdit;
  60. HWND m_hbtnRemove;
  61. };
  62. class CElanPropertiesDialog : public CDialogImpl<CElanPropertiesDialog>
  63. {
  64. public:
  65. enum { IDD = IDD_ELAN_PROPERTIES };
  66. BEGIN_MSG_MAP(CElanPropertiesDialog)
  67. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog);
  68. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu);
  69. MESSAGE_HANDLER(WM_HELP, OnHelp);
  70. COMMAND_ID_HANDLER(IDOK, OnOk);
  71. COMMAND_ID_HANDLER(IDCANCEL, OnCancel);
  72. END_MSG_MAP()
  73. public:
  74. CElanPropertiesDialog(CALanePsh * pCALanePsh, CALaneCfgElanInfo *pElanInfo,
  75. const DWORD * adwHelpIDs = NULL);
  76. ~CElanPropertiesDialog(){};
  77. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  78. LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  79. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  80. LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  81. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  82. private:
  83. HWND m_hElanName;
  84. CALaneCfgElanInfo * m_pElanInfo;
  85. CALanePsh * m_pParentDlg;
  86. const DWORD * m_adwHelpIDs;
  87. };