home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 20.ddi / MFC / SRC / VBDDXF.CP_ / VBDDXF.CP
Encoding:
Text File  |  1993-02-08  |  1.4 KB  |  48 lines

  1. // This is a part of the Microsoft Classes C++ Class Library.
  2. // Copyright (C) 1992 Microsoft Corporation,
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and Microsoft
  7. // QuickHelp and/or WinHelp documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #include "stdafx.h"
  12.  
  13. #ifdef AFX_VBX_SEG
  14. #pragma code_seg(AFX_VBX_SEG)
  15. #endif
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char BASED_CODE THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // VB float properties
  24.  
  25. void AFXAPI DDX_VBFloat(CDataExchange* pDX, int nIDC, int nPropIndex,
  26.     float& value)
  27. {
  28.     CVBControl* pControl = pDX->PrepareVBCtrl(nIDC);
  29.     ASSERT(pControl->GetPropType(nPropIndex) == DT_REAL);
  30.     if (pDX->m_bSaveAndValidate)
  31.         value = pControl->GetFloatProperty(nPropIndex);
  32.     else
  33.         pControl->SetFloatProperty(nPropIndex, value);
  34. }
  35.  
  36. void AFXAPI DDX_VBFloatRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  37.     float& value)
  38. {
  39.     if (pDX->m_bSaveAndValidate)
  40.     {
  41.         CVBControl* pControl = pDX->PrepareVBCtrl(nIDC);
  42.         ASSERT(pControl->GetPropType(nPropIndex) == DT_REAL);
  43.         value = pControl->GetFloatProperty(nPropIndex);
  44.     }
  45. }
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48.