home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC / include / afxctl.inl < prev    next >
Encoding:
Text File  |  1999-02-19  |  5.4 KB  |  118 lines

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