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.

149 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. psrvdlg.cpp
  5. Abstract:
  6. Per server confirmation dialog.
  7. Author:
  8. Don Ryan (donryan) 28-Feb-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #include "stdafx.h"
  14. #include "llsmgr.h"
  15. #include "psrvdlg.h"
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char BASED_CODE THIS_FILE[] = __FILE__;
  19. #endif
  20. BEGIN_MESSAGE_MAP(CPerServerLicensingDialog, CDialog)
  21. //{{AFX_MSG_MAP(CPerServerLicensingDialog)
  22. ON_BN_CLICKED(IDC_PER_SERVER_AGREE, OnAgree)
  23. //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25. CPerServerLicensingDialog::CPerServerLicensingDialog(CWnd* pParent /*=NULL*/)
  26. : CDialog(CPerServerLicensingDialog::IDD, pParent)
  27. /*++
  28. Routine Description:
  29. Constructor for dialog.
  30. Arguments:
  31. pParent - owner window.
  32. Return Values:
  33. None.
  34. --*/
  35. {
  36. //{{AFX_DATA_INIT(CPerServerLicensingDialog)
  37. m_strStaticClients = _T("");
  38. //}}AFX_DATA_INIT
  39. }
  40. void CPerServerLicensingDialog::DoDataExchange(CDataExchange* pDX)
  41. /*++
  42. Routine Description:
  43. Called by framework to exchange dialog data.
  44. Arguments:
  45. pDX - data exchange object.
  46. Return Values:
  47. None.
  48. --*/
  49. {
  50. CDialog::DoDataExchange(pDX);
  51. //{{AFX_DATA_MAP(CPerServerLicensingDialog)
  52. DDX_Control(pDX, IDC_PER_SERVER_AGREE, m_agreeBtn);
  53. DDX_Control(pDX, IDOK, m_okBtn);
  54. DDX_Text(pDX, IDC_PER_SERVER_STATIC_CLIENTS, m_strStaticClients);
  55. //}}AFX_DATA_MAP
  56. }
  57. BOOL CPerServerLicensingDialog::OnInitDialog()
  58. /*++
  59. Routine Description:
  60. Message handler for WM_INITDIALOG.
  61. Arguments:
  62. None.
  63. Return Values:
  64. Returns false if focus set manually.
  65. --*/
  66. {
  67. AfxFormatString2(
  68. m_strStaticClients,
  69. IDS_PER_SERVER_LICENSING_1,
  70. m_strLicenses,
  71. m_strProduct
  72. );
  73. CDialog::OnInitDialog();
  74. m_agreeBtn.SetCheck(0);
  75. m_okBtn.EnableWindow(FALSE);
  76. return TRUE;
  77. }
  78. void CPerServerLicensingDialog::OnAgree()
  79. /*++
  80. Routine Description:
  81. Toggle okay button.
  82. Arguments:
  83. None.
  84. Return Values:
  85. None.
  86. --*/
  87. {
  88. m_okBtn.EnableWindow(!m_okBtn.IsWindowEnabled());
  89. }