/** * @file XTPPropertyGridToolTip.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPPROPERTYGRIDTOOLTIP_H__) # define __XTPPROPERTYGRIDTOOLTIP_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPPropertyGridToolTip is a CWnd derived class. * It is an internal class used by the property grid control. */ class _XTP_EXT_CLASS CXTPPropertyGridToolTip : public CWnd { public: /** * @brief * Constructs a CXTPPropertyGridToolTip object. */ CXTPPropertyGridToolTip(); /** * @brief * Activates/destroys the tooltip control. * @param bActive TRUE to activate the tooltip control, FALSE to destroy. * @param pItem Pointer to the item whose tooltip must be shown. * @param bValuePart TRUE to show the tooltip of the value part. */ void Activate(BOOL bActive, CXTPPropertyGridItem* pItem, BOOL bValuePart); /** * @brief * Creates a tooltip control. * @param pParentWnd Pointer to a CXTPPropertyGridView object. */ void Create(CXTPPropertyGridView* pParentWnd); protected: /** @cond */ DECLARE_MESSAGE_MAP() //{{AFX_MSG(CXTPPropertyGridView) afx_msg BOOL OnEraseBkgnd(CDC*); afx_msg void OnPaint(); afx_msg LRESULT OnNcHitTest(CPoint point); //}}AFX_MSG /** @endcond */ private: BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL); protected: CXTPPropertyGridView* m_pGrid; /**< Parent window. */ CXTPFont m_xtpFont; /**< Font used to display the tooltip. */ XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fnt, m_xtpFont, GetFontHandle); friend class CXTPPropertyGridView; }; /** @cond */ AFX_INLINE BOOL CXTPPropertyGridToolTip::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) { return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext); } /** @endcond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // __XTPPROPERTYGRIDTOOLTIP_H__ /** @endcond */