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.

81 lines
2.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: C O M M C O N P . H
  7. //
  8. // Contents: Private includes for the common connection ui
  9. //
  10. // Notes:
  11. //
  12. // Author: scottbri 15 Jan 1998
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #ifndef _COMMCONP_H_
  17. #define _COMMCONP_H_
  18. class CChooseConnectionData
  19. {
  20. public:
  21. static HRESULT HrCreate(INetConnection *, CChooseConnectionData **);
  22. ~CChooseConnectionData();
  23. INetConnection * PConnection() {return m_pConn;}
  24. PCWSTR SzName() {return m_strName.c_str();}
  25. VOID SetCharacteristics(DWORD dw) {m_dwChar = dw;};
  26. VOID SetName(PCWSTR sz) {m_strName = sz;}
  27. VOID SetStatus(NETCON_STATUS ncs) {m_Ncs = ncs;}
  28. VOID SetType(NETCON_MEDIATYPE nct) {m_Nct = nct;}
  29. NETCON_STATUS ConnStatus() {return m_Ncs;}
  30. NETCON_MEDIATYPE ConnType() {return m_Nct;}
  31. DWORD Characteristics() {return m_dwChar;}
  32. private:
  33. CChooseConnectionData(INetConnection *);
  34. private:
  35. INetConnection * m_pConn;
  36. NETCON_MEDIATYPE m_Nct;
  37. NETCON_STATUS m_Ncs;
  38. DWORD m_dwChar;
  39. tstring m_strName;
  40. };
  41. class CChooseConnectionDlg
  42. {
  43. public:
  44. CChooseConnectionDlg(NETCON_CHOOSECONN * pChooseConn,
  45. CConnectionCommonUi * pConnUi,
  46. INetConnection** ppConn);
  47. ~CChooseConnectionDlg();
  48. static INT_PTR CALLBACK dlgprocConnChooser(HWND, UINT, WPARAM, LPARAM);
  49. static HRESULT HrLoadImageList(HIMAGELIST *);
  50. private:
  51. CChooseConnectionData * GetData(LPARAM lIdx);
  52. CChooseConnectionData * GetCurrentData();
  53. BOOL OnInitDialog(HWND);
  54. VOID ReleaseData();
  55. BOOL OnOk();
  56. BOOL OnNew();
  57. BOOL OnProps();
  58. VOID UpdateOkState();
  59. LONG FillChooserCombo();
  60. BOOL IsConnTypeInMask(NETCON_MEDIATYPE nct);
  61. INT ConnTypeToImageIdx(NETCON_MEDIATYPE nct);
  62. private:
  63. NETCON_CHOOSECONN * m_pChooseConn;
  64. CConnectionCommonUi * m_pConnUi;
  65. INetConnection ** m_ppConn; // Output parameter
  66. HWND m_hWnd;
  67. };
  68. #endif