occddxf.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 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 related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. #include "stdafx.h"
  11. #include "occimpl.h"
  12. #ifdef AFX_OCC_SEG
  13. #pragma code_seg(AFX_OCC_SEG)
  14. #endif
  15. #ifdef _DEBUG
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19. #define new DEBUG_NEW
  20. #ifndef _AFX_NO_OCC_SUPPORT
  21. void AFXAPI DDX_OCFloat(CDataExchange* pDX, int nIDC, DISPID dispid,
  22. float &value)
  23. {
  24. CWnd* pControl = pDX->PrepareOleCtrl(nIDC);
  25. if (pDX->m_bSaveAndValidate)
  26. pControl->GetProperty(dispid, VT_R4, &value);
  27. else
  28. pControl->SetProperty(dispid, VT_R4, value);
  29. }
  30. void AFXAPI DDX_OCFloatRO(CDataExchange* pDX, int nIDC, DISPID dispid,
  31. float &value)
  32. {
  33. if (pDX->m_bSaveAndValidate)
  34. {
  35. CWnd* pControl = pDX->PrepareOleCtrl(nIDC);
  36. pControl->GetProperty(dispid, VT_R4, &value);
  37. }
  38. }
  39. void AFXAPI DDX_OCFloat(CDataExchange* pDX, int nIDC, DISPID dispid,
  40. double &value)
  41. {
  42. CWnd* pControl = pDX->PrepareOleCtrl(nIDC);
  43. if (pDX->m_bSaveAndValidate)
  44. pControl->GetProperty(dispid, VT_R8, &value);
  45. else
  46. pControl->SetProperty(dispid, VT_R8, value);
  47. }
  48. void AFXAPI DDX_OCFloatRO(CDataExchange* pDX, int nIDC, DISPID dispid,
  49. double &value)
  50. {
  51. if (pDX->m_bSaveAndValidate)
  52. {
  53. CWnd* pControl = pDX->PrepareOleCtrl(nIDC);
  54. pControl->GetProperty(dispid, VT_R8, &value);
  55. }
  56. }
  57. #endif // !_AFX_NO_OCC_SUPPORT