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.

144 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. srvldlg.h
  5. Abstract:
  6. Server licensing dialog implementation.
  7. Author:
  8. Don Ryan (donryan) 03-Mar-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #include "stdafx.h"
  14. #include "llsmgr.h"
  15. #include "srvldlg.h"
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char BASED_CODE THIS_FILE[] = __FILE__;
  19. #endif
  20. BEGIN_MESSAGE_MAP(CServerLicensingDialog, CDialog)
  21. //{{AFX_MSG_MAP(CServerLicensingDialog)
  22. ON_BN_CLICKED(IDC_SERVER_AGREE, OnAgree)
  23. //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25. CServerLicensingDialog::CServerLicensingDialog(CWnd* pParent /*=NULL*/)
  26. : CDialog(CServerLicensingDialog::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(CServerLicensingDialog)
  37. m_bAgree = FALSE;
  38. //}}AFX_DATA_INIT
  39. }
  40. void CServerLicensingDialog::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(CServerLicensingDialog)
  52. DDX_Control(pDX, IDOK, m_okBtn);
  53. DDX_Control(pDX, IDC_SERVER_AGREE, m_agreeBtn);
  54. DDX_Check(pDX, IDC_SERVER_AGREE, m_bAgree);
  55. //}}AFX_DATA_MAP
  56. }
  57. BOOL CServerLicensingDialog::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. CDialog::OnInitDialog();
  68. m_agreeBtn.SetCheck(0);
  69. m_okBtn.EnableWindow(FALSE);
  70. return TRUE;
  71. }
  72. void CServerLicensingDialog::OnAgree()
  73. /*++
  74. Routine Description:
  75. Toggle okay button.
  76. Arguments:
  77. None.
  78. Return Values:
  79. None.
  80. --*/
  81. {
  82. m_okBtn.EnableWindow(!m_okBtn.IsWindowEnabled());
  83. }