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.

137 lines
3.4 KiB

  1. // inputvw.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. #include "stdafx.h"
  13. #include "viewex.h"
  14. #ifdef _DEBUG
  15. #undef THIS_FILE
  16. static char BASED_CODE THIS_FILE[] = __FILE__;
  17. #endif
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CInputView
  20. IMPLEMENT_DYNCREATE(CInputView, CFormView)
  21. /***********************************************************
  22. Function:
  23. Arguments:
  24. Return:
  25. Purpose:
  26. Author(s):
  27. Revision:
  28. Date:
  29. ***********************************************************/
  30. CInputView::CInputView()
  31. : CFormView(CInputView::IDD)
  32. {
  33. //{{AFX_DATA_INIT(CInputView)
  34. m_strData = "";
  35. m_iColor = -1;
  36. //}}AFX_DATA_INIT
  37. }
  38. /***********************************************************
  39. Function:
  40. Arguments:
  41. Return:
  42. Purpose:
  43. Author(s):
  44. Revision:
  45. Date:
  46. ***********************************************************/
  47. CInputView::~CInputView()
  48. {
  49. }
  50. /***********************************************************
  51. Function:
  52. Arguments:
  53. Return:
  54. Purpose:
  55. Author(s):
  56. Revision:
  57. Date:
  58. ***********************************************************/
  59. void CInputView::OnUpdate(CView*, LPARAM, CObject*)
  60. {
  61. }
  62. /***********************************************************
  63. Function:
  64. Arguments:
  65. Return:
  66. Purpose:
  67. Author(s):
  68. Revision:
  69. Date:
  70. ***********************************************************/
  71. void CInputView::DoDataExchange(CDataExchange* pDX)
  72. {
  73. CFormView::DoDataExchange(pDX);
  74. //{{AFX_DATA_MAP(CInputView)
  75. DDX_Text(pDX, IDC_EDIT1, m_strData);
  76. DDX_Radio(pDX, IDC_RADIO1, m_iColor);
  77. //}}AFX_DATA_MAP
  78. }
  79. BEGIN_MESSAGE_MAP(CInputView, CFormView)
  80. //{{AFX_MSG_MAP(CInputView)
  81. ON_EN_CHANGE(IDC_EDIT1, OnDataChange)
  82. ON_BN_CLICKED(IDC_RADIO1, OnDataChange)
  83. ON_BN_CLICKED(IDC_RADIO2, OnDataChange)
  84. ON_BN_CLICKED(IDC_RADIO3, OnDataChange)
  85. //}}AFX_MSG_MAP
  86. END_MESSAGE_MAP()
  87. /////////////////////////////////////////////////////////////////////////////
  88. // CInputView message handlers
  89. /***********************************************************
  90. Function:
  91. Arguments:
  92. Return:
  93. Purpose:
  94. Author(s):
  95. Revision:
  96. Date:
  97. ***********************************************************/
  98. void CInputView::OnDataChange()
  99. {
  100. /*if (!UpdateData())
  101. return;
  102. CMainDoc* pDoc = GetDocument();
  103. COLORREF color = RGB(255 * (m_iColor == 0),
  104. 255 * (m_iColor == 1),
  105. 255 * (m_iColor == 2));
  106. BOOL bUpdate = FALSE;
  107. if (m_strData != pDoc->m_strData)
  108. {
  109. pDoc->m_strData = m_strData;
  110. bUpdate = TRUE;
  111. }
  112. if (color != pDoc->m_colorData)
  113. {
  114. pDoc->m_colorData = color;
  115. bUpdate = TRUE;
  116. }
  117. if (bUpdate)
  118. {
  119. // if the document stored data then we would call SetModifiedFlag here
  120. pDoc->UpdateAllViews(this);
  121. }*/
  122. }
  123. /////////////////////////////////////////////////////////////////////////////