Leaked source code of windows server 2003
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.

152 lines
2.3 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. Jeff Parham (jeffparh) 15-Dec-1995
  13. Robbed from LLSMGR.
  14. --*/
  15. #include "stdafx.h"
  16. #include "ccfapi.h"
  17. #include "psrvdlg.h"
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22. BEGIN_MESSAGE_MAP(CPerServerLicensingDialog, CDialog)
  23. //{{AFX_MSG_MAP(CPerServerLicensingDialog)
  24. ON_BN_CLICKED(IDC_PER_SERVER_AGREE, OnAgree)
  25. //}}AFX_MSG_MAP
  26. END_MESSAGE_MAP()
  27. CPerServerLicensingDialog::CPerServerLicensingDialog(CWnd* pParent /*=NULL*/)
  28. : CDialog(CPerServerLicensingDialog::IDD, pParent)
  29. /*++
  30. Routine Description:
  31. Constructor for dialog.
  32. Arguments:
  33. pParent - owner window.
  34. Return Values:
  35. None.
  36. --*/
  37. {
  38. //{{AFX_DATA_INIT(CPerServerLicensingDialog)
  39. m_strStaticClients = _T("");
  40. //}}AFX_DATA_INIT
  41. }
  42. void CPerServerLicensingDialog::DoDataExchange(CDataExchange* pDX)
  43. /*++
  44. Routine Description:
  45. Called by framework to exchange dialog data.
  46. Arguments:
  47. pDX - data exchange object.
  48. Return Values:
  49. None.
  50. --*/
  51. {
  52. CDialog::DoDataExchange(pDX);
  53. //{{AFX_DATA_MAP(CPerServerLicensingDialog)
  54. DDX_Control(pDX, IDC_PER_SERVER_AGREE, m_agreeBtn);
  55. DDX_Control(pDX, IDOK, m_okBtn);
  56. DDX_Text(pDX, IDC_PER_SERVER_STATIC_CLIENTS, m_strStaticClients);
  57. //}}AFX_DATA_MAP
  58. }
  59. BOOL CPerServerLicensingDialog::OnInitDialog()
  60. /*++
  61. Routine Description:
  62. Message handler for WM_INITDIALOG.
  63. Arguments:
  64. None.
  65. Return Values:
  66. Returns false if focus set manually.
  67. --*/
  68. {
  69. AfxFormatString2(
  70. m_strStaticClients,
  71. IDS_PER_SERVER_LICENSING_1,
  72. m_strLicenses,
  73. m_strProduct
  74. );
  75. CDialog::OnInitDialog();
  76. m_agreeBtn.SetCheck(0);
  77. m_okBtn.EnableWindow(FALSE);
  78. return TRUE;
  79. }
  80. void CPerServerLicensingDialog::OnAgree()
  81. /*++
  82. Routine Description:
  83. Toggle okay button.
  84. Arguments:
  85. None.
  86. Return Values:
  87. None.
  88. --*/
  89. {
  90. m_okBtn.EnableWindow(!m_okBtn.IsWindowEnabled());
  91. }