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.

151 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. pseatdlg.cpp
  5. Abstract:
  6. Per seat 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 "pseatdlg.h"
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char BASED_CODE THIS_FILE[] = __FILE__;
  19. #endif
  20. BEGIN_MESSAGE_MAP(CPerSeatLicensingDialog, CDialog)
  21. //{{AFX_MSG_MAP(CPerSeatLicensingDialog)
  22. ON_BN_CLICKED(IDC_PER_SEAT_AGREE, OnAgree)
  23. //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25. CPerSeatLicensingDialog::CPerSeatLicensingDialog(CWnd* pParent /*=NULL*/)
  26. : CDialog(CPerSeatLicensingDialog::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(CPerSeatLicensingDialog)
  37. m_strStaticClients = _T("");
  38. //}}AFX_DATA_INIT
  39. m_strProduct = _T("");
  40. }
  41. void CPerSeatLicensingDialog::DoDataExchange(CDataExchange* pDX)
  42. /*++
  43. Routine Description:
  44. Called by framework to exchange dialog data.
  45. Arguments:
  46. pDX - data exchange object.
  47. Return Values:
  48. None.
  49. --*/
  50. {
  51. CDialog::DoDataExchange(pDX);
  52. //{{AFX_DATA_MAP(CPerSeatLicensingDialog)
  53. DDX_Control(pDX, IDC_PER_SEAT_AGREE, m_agreeBtn);
  54. DDX_Control(pDX, IDOK, m_okBtn);
  55. DDX_Text(pDX, IDC_PER_SEAT_STATIC_CLIENTS, m_strStaticClients);
  56. //}}AFX_DATA_MAP
  57. }
  58. BOOL CPerSeatLicensingDialog::OnInitDialog()
  59. /*++
  60. Routine Description:
  61. Message handler for WM_INITDIALOG.
  62. Arguments:
  63. None.
  64. Return Values:
  65. Returns false if focus set manually.
  66. --*/
  67. {
  68. AfxFormatString1(
  69. m_strStaticClients,
  70. IDS_PER_SEAT_LICENSING_1,
  71. m_strProduct
  72. );
  73. CDialog::OnInitDialog();
  74. m_agreeBtn.SetCheck(0);
  75. m_okBtn.EnableWindow(FALSE);
  76. return TRUE;
  77. }
  78. void CPerSeatLicensingDialog::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. }