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.

154 lines
2.3 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. Jeff Parham (jeffparh) 15-Dec-1995
  13. Robbed from LLSMGR.
  14. --*/
  15. #include "stdafx.h"
  16. #include "ccfapi.h"
  17. #include "pseatdlg.h"
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22. BEGIN_MESSAGE_MAP(CPerSeatLicensingDialog, CDialog)
  23. //{{AFX_MSG_MAP(CPerSeatLicensingDialog)
  24. ON_BN_CLICKED(IDC_PER_SEAT_AGREE, OnAgree)
  25. //}}AFX_MSG_MAP
  26. END_MESSAGE_MAP()
  27. CPerSeatLicensingDialog::CPerSeatLicensingDialog(CWnd* pParent /*=NULL*/)
  28. : CDialog(CPerSeatLicensingDialog::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(CPerSeatLicensingDialog)
  39. m_strStaticClients = _T("");
  40. //}}AFX_DATA_INIT
  41. m_strProduct = _T("");
  42. }
  43. void CPerSeatLicensingDialog::DoDataExchange(CDataExchange* pDX)
  44. /*++
  45. Routine Description:
  46. Called by framework to exchange dialog data.
  47. Arguments:
  48. pDX - data exchange object.
  49. Return Values:
  50. None.
  51. --*/
  52. {
  53. CDialog::DoDataExchange(pDX);
  54. //{{AFX_DATA_MAP(CPerSeatLicensingDialog)
  55. DDX_Control(pDX, IDC_PER_SEAT_AGREE, m_agreeBtn);
  56. DDX_Control(pDX, IDOK, m_okBtn);
  57. DDX_Text(pDX, IDC_PER_SEAT_STATIC_CLIENTS, m_strStaticClients);
  58. //}}AFX_DATA_MAP
  59. }
  60. BOOL CPerSeatLicensingDialog::OnInitDialog()
  61. /*++
  62. Routine Description:
  63. Message handler for WM_INITDIALOG.
  64. Arguments:
  65. None.
  66. Return Values:
  67. Returns false if focus set manually.
  68. --*/
  69. {
  70. AfxFormatString1(
  71. m_strStaticClients,
  72. IDS_PER_SEAT_LICENSING_1,
  73. m_strProduct
  74. );
  75. CDialog::OnInitDialog();
  76. m_agreeBtn.SetCheck(0);
  77. m_okBtn.EnableWindow(FALSE);
  78. return TRUE;
  79. }
  80. void CPerSeatLicensingDialog::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. }