/** * @file XTPControlProgress.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(__XTPCONTOLPROGRESS_H__) # define __XTPCONTOLPROGRESS_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPProgressPaintManager; /** * @brief * CXTPControlProgress is a CXTPControl derived class. * It represents a progress control. */ class _XTP_EXT_CLASS CXTPControlProgress : public CXTPControl , public CXTPProgressBase { /** @cond */ DECLARE_XTP_CONTROL(CXTPControlProgress) /** @endcond */ public: /** * @brief * Constructs a CXTPControlProgress object. */ CXTPControlProgress(); protected: /** * @brief * This method is called to determine the size of the control. * @param pDC Pointer to a valid device context. * @return * A CSize object containing the size of the control. */ virtual CSize GetSize(CDC* pDC); /** * @brief * This method is called to draw the control. * @param pDC Pointer to a valid device context. */ virtual void Draw(CDC* pDC); protected: /** * @brief * Call this member to redraw the progress bar. */ virtual void RedrawProgress(); /** * @brief * Call this member to retrieve the paint manager of the progress bar. * @return * A pointer to a CXTPProgressPaintManager object. */ virtual CXTPProgressPaintManager* GetProgressPaintManager() const; /** * @brief * Call this member to get the bounding rectangle of the control. * @return * The bounding rectangle of the control. */ virtual CRect GetProgressRect(); /** * @brief * This method is called when the user clicks the control. * @param bKeyboard TRUE if the control is selected using the keyboard. * @param pt Mouse cursor position. */ virtual void OnClick(BOOL bKeyboard = FALSE, CPoint pt = CPoint(0, 0)); protected: /** * @brief * This method makes a copy of the progress bar. * @param pControl Control to be copied. * @param bRecursive TRUE to copy recursively. */ void Copy(CXTPControl* pControl, BOOL bRecursive = FALSE); /** * @brief * Either reads this object from or writes this object to an archive. * @param pPX A CXTPPropExchange object to serialize to or from. */ void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_COMMANDBARS_ACTIVEX /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPControlProgress); afx_msg void OleRangeChanged(); afx_msg void OleSetPos(int nPos); afx_msg int OleGetPos(); /** @endcond */ # endif }; /** @cond */ AFX_INLINE int CXTPProgressBase::GetPos() const { return m_nPos; } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCONTOLPROGRESS_H__) /** @endcond */