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.

115 lines
5.4 KiB

  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. // Inlines for AFXCTL.H
  11. #ifdef _AFXCTL_INLINE
  12. /////////////////////////////////////////////////////////////////////////////
  13. // COleControl inlines
  14. _AFXCTL_INLINE BOOL COleControl::IsOptimizedDraw()
  15. { return m_bOptimizedDraw; }
  16. _AFXCTL_INLINE BOOL COleControl::IsConvertingVBX()
  17. { return m_bConvertVBX; }
  18. _AFXCTL_INLINE void COleControl::FireKeyDown(USHORT* pnChar, short nShiftState)
  19. { FireEvent(DISPID_KEYDOWN, EVENT_PARAM(VTS_PI2 VTS_I2), pnChar,
  20. nShiftState); }
  21. _AFXCTL_INLINE void COleControl::FireKeyUp(USHORT* pnChar, short nShiftState)
  22. { FireEvent(DISPID_KEYUP, EVENT_PARAM(VTS_PI2 VTS_I2), pnChar,
  23. nShiftState); }
  24. _AFXCTL_INLINE void COleControl::FireKeyPress(USHORT* pnChar)
  25. { FireEvent(DISPID_KEYPRESS, EVENT_PARAM(VTS_PI2), pnChar); }
  26. _AFXCTL_INLINE void COleControl::FireMouseDown(short nButton,
  27. short nShiftState, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
  28. { FireEvent(DISPID_MOUSEDOWN,
  29. EVENT_PARAM(VTS_I2 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS),
  30. nButton, nShiftState, x, y); }
  31. _AFXCTL_INLINE void COleControl::FireMouseUp(short nButton,
  32. short nShiftState, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
  33. { FireEvent(DISPID_MOUSEUP,
  34. EVENT_PARAM(VTS_I2 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS),
  35. nButton, nShiftState, x, y); }
  36. _AFXCTL_INLINE void COleControl::FireMouseMove(short nButton,
  37. short nShiftState, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
  38. { FireEvent(DISPID_MOUSEMOVE,
  39. EVENT_PARAM(VTS_I2 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS),
  40. nButton, nShiftState, x, y); }
  41. _AFXCTL_INLINE void COleControl::FireClick()
  42. { FireEvent(DISPID_CLICK, EVENT_PARAM(VTS_NONE)); }
  43. _AFXCTL_INLINE void COleControl::FireDblClick()
  44. { FireEvent(DISPID_DBLCLICK, EVENT_PARAM(VTS_NONE)); }
  45. _AFXCTL_INLINE void COleControl::FireReadyStateChange()
  46. { FireEvent(DISPID_READYSTATECHANGE, EVENT_PARAM(VTS_I4), m_lReadyState); }
  47. _AFXCTL_INLINE void COleControl::InternalSetReadyState(long lNewReadyState)
  48. { ASSERT((lNewReadyState >=0) && (lNewReadyState <= READYSTATE_COMPLETE));
  49. if (m_lReadyState != lNewReadyState)
  50. {m_lReadyState = lNewReadyState; FireReadyStateChange(); } }
  51. _AFXCTL_INLINE BOOL COleControl::ExchangeVersion(
  52. CPropExchange* pPX, DWORD dwVersionDefault, BOOL bConvert)
  53. { return pPX->ExchangeVersion(m_dwVersionLoaded, dwVersionDefault, bConvert); }
  54. _AFXCTL_INLINE DWORD COleControl::GetStockEventMask() const
  55. { return *GetEventMap()->lpStockEventMask; }
  56. _AFXCTL_INLINE DWORD COleControl::GetStockPropMask() const
  57. { return *GetDispatchMap()->lpStockPropMask; }
  58. _AFXCTL_INLINE void COleControl::RequestAsynchronousExchange(DWORD dwVersion)
  59. { m_bDataPathPropertiesLoaded = FALSE; m_dwDataPathVersionToReport = dwVersion; }
  60. // CPropExchange inlines
  61. _AFXCTL_INLINE CPropExchange::CPropExchange() : m_dwVersion(0), m_bAsync(FALSE)
  62. { }
  63. _AFXCTL_INLINE BOOL CPropExchange::IsLoading()
  64. { return m_bLoading; }
  65. _AFXCTL_INLINE DWORD CPropExchange::GetVersion()
  66. { return m_dwVersion; }
  67. _AFXCTL_INLINE BOOL CPropExchange::IsAsynchronous()
  68. { return m_bAsync; }
  69. // CDataPathProperty inlines
  70. _AFXCTL_INLINE CDataPathProperty::CDataPathProperty(COleControl* pControl)
  71. : m_pControl(pControl) {}
  72. _AFXCTL_INLINE CDataPathProperty::CDataPathProperty(LPCTSTR lpszPath, COleControl* pControl)
  73. : m_pControl(pControl), m_strPath(lpszPath) {}
  74. _AFXCTL_INLINE void CDataPathProperty::SetPath(LPCTSTR lpszPath)
  75. { ASSERT_VALID(this); m_strPath = lpszPath; }
  76. _AFXCTL_INLINE CString CDataPathProperty::GetPath() const
  77. { ASSERT_VALID(this); return m_strPath; }
  78. _AFXCTL_INLINE COleControl* CDataPathProperty::GetControl()
  79. { ASSERT_VALID(this); return m_pControl; }
  80. _AFXCTL_INLINE void CDataPathProperty::SetControl(COleControl* pControl)
  81. { ASSERT_VALID(this); m_pControl=pControl; }
  82. // CCachedDataPathProperty inlines
  83. _AFXCTL_INLINE CCachedDataPathProperty::CCachedDataPathProperty(COleControl* pControl)
  84. : CDataPathProperty(pControl) {}
  85. _AFXCTL_INLINE CCachedDataPathProperty::CCachedDataPathProperty(LPCTSTR lpszPath, COleControl* pControl)
  86. : CDataPathProperty(lpszPath, pControl) {}
  87. // inline DDP_ routines
  88. _AFXCTL_INLINE void AFXAPI DDP_LBString(CDataExchange* pDX, int id,
  89. CString& member, LPCTSTR pszPropName)
  90. { DDP_Text(pDX, id, member, pszPropName); }
  91. _AFXCTL_INLINE void AFXAPI DDP_LBStringExact(CDataExchange* pDX, int id,
  92. CString& member, LPCTSTR pszPropName)
  93. { DDP_Text(pDX, id, member, pszPropName); }
  94. _AFXCTL_INLINE void AFXAPI DDP_LBIndex(CDataExchange* pDX, int id,
  95. int& member, LPCTSTR pszPropName)
  96. { DDP_Text(pDX, id, member, pszPropName); }
  97. _AFXCTL_INLINE void AFXAPI DDP_CBString(CDataExchange* pDX, int id,
  98. CString& member, LPCTSTR pszPropName)
  99. { DDP_Text(pDX, id, member, pszPropName); }
  100. _AFXCTL_INLINE void AFXAPI DDP_CBStringExact(CDataExchange* pDX, int id,
  101. CString& member, LPCTSTR pszPropName)
  102. { DDP_Text(pDX, id, member, pszPropName); }
  103. _AFXCTL_INLINE void AFXAPI DDP_CBIndex(CDataExchange* pDX, int id,
  104. int& member, LPCTSTR pszPropName)
  105. { DDP_Text(pDX, id, member, pszPropName); }
  106. #endif //_AFXCTL_INLINE