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.

81 lines
2.2 KiB

  1. //+---------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1997.
  5. //
  6. // File: newsrvr.cpp
  7. //
  8. // Contents: Implements the new server dialog
  9. //
  10. // Classes:
  11. //
  12. // Methods: CNewServer::CNewServer
  13. // CNewServer::~CNewServer
  14. // CNewServer::DoDataExchange
  15. // CNewServer::OnLocal
  16. // CNewServer::OnRemote
  17. //
  18. // History: 23-Apr-96 BruceMa Created.
  19. //
  20. //----------------------------------------------------------------------
  21. #include "stdafx.h"
  22. #include "olecnfg.h"
  23. #include "newsrvr.h"
  24. #ifdef _DEBUG
  25. #define new DEBUG_NEW
  26. #undef THIS_FILE
  27. static char THIS_FILE[] = __FILE__;
  28. #endif
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CNewServer dialog
  31. CNewServer::CNewServer(CWnd* pParent /*=NULL*/)
  32. : CDialog(CNewServer::IDD, pParent)
  33. {
  34. //{{AFX_DATA_INIT(CNewServer)
  35. // NOTE: the ClassWizard will add member initialization here
  36. //}}AFX_DATA_INIT
  37. }
  38. void CNewServer::DoDataExchange(CDataExchange* pDX)
  39. {
  40. CDialog::DoDataExchange(pDX);
  41. //{{AFX_DATA_MAP(CNewServer)
  42. // NOTE: the ClassWizard will add DDX and DDV calls here
  43. //}}AFX_DATA_MAP
  44. }
  45. BEGIN_MESSAGE_MAP(CNewServer, CDialog)
  46. //{{AFX_MSG_MAP(CNewServer)
  47. ON_BN_CLICKED(IDC_RADIO1, OnLocal)
  48. ON_BN_CLICKED(IDC_RADIO2, OnRemote)
  49. //}}AFX_MSG_MAP
  50. END_MESSAGE_MAP()
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CNewServer message handlers
  53. void CNewServer::OnLocal()
  54. {
  55. // TODO: Add your control notification handler code here
  56. GetDlgItem(IDC_EDIT2)->EnableWindow(TRUE);
  57. GetDlgItem(IDC_BUTTON1)->EnableWindow(TRUE);
  58. GetDlgItem(IDC_EDIT3)->EnableWindow(FALSE);
  59. GetDlgItem(IDC_BUTTON2)->EnableWindow(FALSE);
  60. }
  61. void CNewServer::OnRemote()
  62. {
  63. // TODO: Add your control notification handler code here
  64. GetDlgItem(IDC_EDIT3)->EnableWindow(TRUE);
  65. GetDlgItem(IDC_BUTTON2)->EnableWindow(TRUE);
  66. GetDlgItem(IDC_EDIT2)->EnableWindow(FALSE);
  67. GetDlgItem(IDC_BUTTON1)->EnableWindow(FALSE);
  68. }