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.

115 lines
3.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: L A N W I Z . H
  7. //
  8. // Contents: Declaration of the LAN wizard page
  9. //
  10. // Notes:
  11. //
  12. // Author: tongl 16 Oct 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "nsbase.h" // must be first to include atl
  17. #include "ncatlps.h"
  18. #include "resource.h"
  19. #include "util.h"
  20. class CLanWizPage : public CPropSheetPage
  21. {
  22. public:
  23. // Declare the message map
  24. BEGIN_MSG_MAP(CLanWizPage)
  25. // Initialize dialog
  26. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  27. MESSAGE_HANDLER(WM_DESTROY, OnDestroyDialog)
  28. // Property page notification message handlers
  29. NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnActive)
  30. NOTIFY_CODE_HANDLER(PSN_KILLACTIVE, OnKillActive)
  31. // NOTIFY_CODE_HANDLER(PSN_WIZBACK, OnWizBack)
  32. // NOTIFY_CODE_HANDLER(PSN_WIZNEXT, OnWizNext)
  33. // NOTIFY_CODE_HANDLER(PSN_WIZFINISH, OnWizFinish)
  34. // Push button handlers
  35. COMMAND_ID_HANDLER(IDC_PSH_ADD, OnAdd)
  36. COMMAND_ID_HANDLER(IDC_PSH_REMOVE, OnRemove)
  37. COMMAND_ID_HANDLER(IDC_PSH_PROPERTIES, OnProperties)
  38. // Listview handlers
  39. NOTIFY_CODE_HANDLER(NM_CLICK, OnClick)
  40. NOTIFY_CODE_HANDLER(NM_DBLCLK, OnDbClick)
  41. NOTIFY_CODE_HANDLER(LVN_KEYDOWN, OnKeyDown)
  42. NOTIFY_CODE_HANDLER(LVN_ITEMCHANGED, OnItemChanged)
  43. NOTIFY_CODE_HANDLER(LVN_DELETEITEM, OnDeleteItem)
  44. END_MSG_MAP()
  45. public:
  46. CLanWizPage(IUnknown *punk);
  47. public:
  48. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  49. LRESULT OnDestroyDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled);
  50. // notify handlers for the property page
  51. LRESULT OnActive(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  52. LRESULT OnKillActive(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  53. // LRESULT OnWizBack(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  54. // LRESULT OnWizNext(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  55. // LRESULT OnWizFinish(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  56. // push button handlers
  57. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  58. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  59. LRESULT OnProperties(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& fHandled);
  60. // listview handlers
  61. LRESULT OnClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  62. LRESULT OnDbClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  63. LRESULT OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  64. LRESULT OnItemChanged(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  65. LRESULT OnDeleteItem(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  66. public:
  67. HRESULT SetNetcfg(INetCfg * pnc);
  68. HRESULT SetAdapter(INetCfgComponent * pnccAdapter);
  69. VOID SetReadOnlyMode(BOOL fReadOnly) {m_fReadOnly = fReadOnly;}
  70. private:
  71. // The INetCfg that has write access
  72. INetCfg * m_pnc;
  73. // The Adapter used in this connection
  74. INetCfgComponent * m_pnccAdapter;
  75. // IUnknown to pass to property UIs to get to the context
  76. IUnknown * m_punk;
  77. // The list view handle
  78. HWND m_hwndList;
  79. // Handles
  80. HANDLES m_Handles;
  81. // Setup can be in readonly mode
  82. BOOL m_fReadOnly;
  83. // The collection of BindingPathObj
  84. // This is for handling the checklist state stuff
  85. ListBPObj m_listBindingPaths;
  86. HIMAGELIST m_hilCheckIcons;
  87. HWND m_hwndDataTip;
  88. };