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.

132 lines
3.2 KiB

  1. #include "pch.h"
  2. #pragma hdrstop
  3. #include "advpage.h"
  4. #include "resource.h"
  5. //+---------------------------------------------------------------------------
  6. //
  7. // Function: HrCreateHomenetUnavailablePage
  8. //
  9. //
  10. // Returns: S_OK if success, Win32 error otherwise
  11. //
  12. // Author: kenwic 19 Dec 2000
  13. //
  14. // Notes:
  15. //
  16. HRESULT HrCreateHomenetUnavailablePage(HRESULT hErrorResult,
  17. CPropSheetPage*& pspPage)
  18. {
  19. pspPage = new CLanHomenetUnavailable(hErrorResult);
  20. return S_OK;
  21. }
  22. CLanHomenetUnavailable::CLanHomenetUnavailable(HRESULT hErrorResult)
  23. {
  24. m_hErrorResult = hErrorResult;
  25. LinkWindow_RegisterClass(); // REVIEW failure here?
  26. }
  27. CLanHomenetUnavailable::~CLanHomenetUnavailable()
  28. {
  29. LinkWindow_UnregisterClass(_Module.GetResourceInstance());
  30. }
  31. //+---------------------------------------------------------------------------
  32. //
  33. // Member: CLanHomenetUnavailable::OnInitDialog
  34. //
  35. // Purpose: Handles the WM_INITDIALOG message
  36. //
  37. // Arguments:
  38. // uMsg []
  39. // wParam []
  40. // lParam []
  41. // bHandled []
  42. //
  43. // Returns: TRUE
  44. //
  45. // Author: aboladeg 14 May 1998
  46. //
  47. // Notes:
  48. //
  49. LRESULT CLanHomenetUnavailable::OnInitDialog(UINT uMsg, WPARAM wParam,
  50. LPARAM lParam, BOOL& bHandled)
  51. {
  52. SetDlgItemText(IDC_ST_ERRORTEXT, SzLoadIds(m_hErrorResult == HRESULT_FROM_WIN32(ERROR_SERVICE_DISABLED) ? IDS_ADVANCEDPAGE_NOWMI_ERROR : IDS_ADVANCEDPAGE_STORE_ERROR));
  53. return TRUE;
  54. }
  55. //+---------------------------------------------------------------------------
  56. //
  57. // Member: CLanHomenetUnavailable::OnContextMenu
  58. //
  59. // Purpose: When right click a control, bring up help
  60. //
  61. // Arguments: Standard command parameters
  62. //
  63. // Returns: Standard return
  64. //
  65. LRESULT
  66. CLanHomenetUnavailable::OnContextMenu(UINT uMsg,
  67. WPARAM wParam,
  68. LPARAM lParam,
  69. BOOL& fHandled)
  70. {
  71. // ::WinHelp(m_hWnd,
  72. // c_szNetCfgHelpFile,
  73. // HELP_CONTEXTMENU,
  74. // (ULONG_PTR)m_adwHelpIDs);
  75. return 0;
  76. }
  77. //+---------------------------------------------------------------------------
  78. //
  79. // Member: CLanHomenetUnavailable::OnHelp
  80. //
  81. // Purpose: When drag context help icon over a control, bring up help
  82. //
  83. // Arguments: Standard command parameters
  84. //
  85. // Returns: Standard return
  86. //
  87. LRESULT
  88. CLanHomenetUnavailable::OnHelp(UINT uMsg,
  89. WPARAM wParam,
  90. LPARAM lParam,
  91. BOOL& fHandled)
  92. {
  93. LPHELPINFO lphi = reinterpret_cast<LPHELPINFO>(lParam);
  94. if (HELPINFO_WINDOW == lphi->iContextType)
  95. {
  96. //::WinHelp(static_cast<HWND>(lphi->hItemHandle), c_szNetCfgHelpFile, HELP_WM_HELP, (ULONG_PTR)m_adwHelpIDs);
  97. }
  98. return 0;
  99. }
  100. //+---------------------------------------------------------------------------
  101. //
  102. // Member: CLanHomenetUnavailable::OnClick
  103. //
  104. // Purpose: Called in response to the NM_CLICK message
  105. //
  106. // Arguments:
  107. // idCtrl []
  108. // pnmh []
  109. // fHandled []
  110. //
  111. // Returns:
  112. //
  113. // Author: kenwic 11 Sep 2000
  114. //
  115. // Notes:
  116. //
  117. LRESULT CLanHomenetUnavailable::OnClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled)
  118. {
  119. return 0;
  120. }