/** * @file XTPSkinObjectTrackBar.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(__XTPSKINOBJECTTRACKBAR_H__) # define __XTPSKINOBJECTTRACKBAR_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPSkinObjectTrackBar is a CXTPSkinObjectFrame derived class. * It implements a standard track bar control. */ class _XTP_EXT_CLASS CXTPSkinObjectTrackBar : public CXTPSkinObjectFrame { /** @cond */ DECLARE_DYNCREATE(CXTPSkinObjectTrackBar) /** @endcond */ private: struct DRAWRECT { RECT rc; int iThumbWidth; int iThumbHeight; int iSizePhys; DWORD dwStyle; }; public: /** * @brief * Constructs a CXTPSkinObjectTrackBar object. */ CXTPSkinObjectTrackBar(); /** * @brief * Destroys a CXTPSkinObjectTrackBar object, handles cleanup and deallocation. */ virtual ~CXTPSkinObjectTrackBar(); protected: /** @cond */ void DrawTics(CDC* pDC); void DrawTicsOneLine(CDC* pDC, int dir, int yTic); void DrawTic(CDC* pDC, int x, int y, int dir, COLORREF clr); int LogToPhys(DWORD dwPos); void FillDrawRect(); void DrawChannel(CDC* pDC); void DrawThumb(CDC* pDC); void OnDraw(CDC* pDC); protected: DECLARE_MESSAGE_MAP() //{{AFX_VIRTUAL(CXTPSkinObjectTrackBar) //}}AFX_VIRTUAL //{{AFX_MSG(CXTPSkinObjectTrackBar) BOOL OnEraseBkgnd(CDC* pDC); void OnPaint(); LRESULT OnSetTicFreq(WPARAM, LPARAM); void OnMouseMove(UINT nFlags, CPoint point); void OnMouseLeave(); void OnLButtonDown(UINT nFlags, CPoint point); void OnLButtonUp(UINT nFlags, CPoint point); LRESULT OnPrintClient(WPARAM wParam, LPARAM lParam); //}}AFX_MSG protected: int m_nTickFreq; /**< Frequency of tick marks */ DRAWRECT m_drawRect; /**< Drawing rectangle */ BOOL m_bHotThumb; /**< TRUE if Thumb is selected */ /** @endcond */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSKINOBJECTTRACKBAR_H__) /** @endcond */