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.

111 lines
1.7 KiB

  1. // Copyright (C) 2000 Microsoft Corporation
  2. //
  3. // Dlg to show the details of the Dynamic DNS registration diagnostic
  4. //
  5. // 5 Oct 2000 sburns
  6. #include "headers.hxx"
  7. #include "DynamicDnsDetailsDialog.hpp"
  8. #include "resource.h"
  9. static const DWORD HELP_MAP[] =
  10. {
  11. 0, 0
  12. };
  13. DynamicDnsDetailsDialog::DynamicDnsDetailsDialog(
  14. const String& details_,
  15. const String& helpTopicLink_)
  16. :
  17. Dialog(
  18. helpTopicLink_.empty()
  19. ? IDD_DYNAMIC_DNS_DETAILS_OK
  20. : IDD_DYNAMIC_DNS_DETAILS_OK_HELP,
  21. HELP_MAP),
  22. details(details_),
  23. helpTopicLink(helpTopicLink_)
  24. {
  25. LOG_CTOR(DynamicDnsDetailsDialog);
  26. ASSERT(!details.empty());
  27. }
  28. DynamicDnsDetailsDialog::~DynamicDnsDetailsDialog()
  29. {
  30. LOG_DTOR(DynamicDnsDetailsDialog);
  31. }
  32. void
  33. DynamicDnsDetailsDialog::OnInit()
  34. {
  35. LOG_FUNCTION(DynamicDnsDetailsDialog::OnInit);
  36. Win::SetDlgItemText(hwnd, IDC_DETAILS, details);
  37. }
  38. bool
  39. DynamicDnsDetailsDialog::OnCommand(
  40. HWND /* windowFrom */ ,
  41. unsigned controlIDFrom,
  42. unsigned code)
  43. {
  44. // LOG_FUNCTION(DynamicDnsDetailsDialog::OnCommand);
  45. switch (controlIDFrom)
  46. {
  47. case IDCANCEL:
  48. case IDOK:
  49. {
  50. if (code == BN_CLICKED)
  51. {
  52. HRESULT unused = Win::EndDialog(hwnd, controlIDFrom);
  53. ASSERT(SUCCEEDED(unused));
  54. return true;
  55. }
  56. break;
  57. }
  58. case IDHELP:
  59. {
  60. if (code == BN_CLICKED)
  61. {
  62. if (!helpTopicLink.empty())
  63. {
  64. Win::HtmlHelp(hwnd, helpTopicLink, HH_DISPLAY_TOPIC, 0);
  65. }
  66. return true;
  67. }
  68. break;
  69. }
  70. default:
  71. {
  72. // do nothing
  73. break;
  74. }
  75. }
  76. return false;
  77. }