/** * @file XTPScrollBar.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(__XTPSCROLLBAR_H__) # define __XTPSCROLLBAR_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * Scrollbar control. * @details * Scrollbars provide easy navigation through a long list of items or a * large amount of information. They can also provide an analog representation * of current position. You can use a scrollbar as an input device or as * an indicator of speed or quantity. For example, to control the volume of a * computer game or to view the time elapsed in a timed process. */ class _XTP_EXT_CLASS CXTPScrollBar : public CXTPScrollBarCtrl { /** @cond */ DECLARE_DYNAMIC(CXTPScrollBar) /** @endcond */ public: /** * @brief * Constructs a CXTPScrollBar object. */ CXTPScrollBar(); /** * @brief * Destroys a CXTPScrollBar object, handles cleanup and deallocation. */ virtual ~CXTPScrollBar(); public: /** * @brief * Call this member to switch the visual theme of the control. * @param nTheme New visual theme. Can be any of the values listed in the Remarks section. * @details * nStyle can be one of the following: * xtpControlThemeDefault: Standard appearance style. * xtpControlThemeFlat: Flat appearance style. * xtpControlThemeUltraFlat: Ultra flat appearance style. * xtpControlThemeOffice2000: Office 2000 appearance style. * xtpControlThemeOfficeXP: Office XP appearance style. * xtpControlThemeOffice2003: Office 2003 appearance style. * xtpControlThemeResource: Office 2007 appearance style. * xtpControlThemeVisualStudio2012Light: VS 2012 Light style theme. * xtpControlThemeVisualStudio2012Dark: VS 2012 Dark style theme. */ void SetTheme(XTPControlTheme nTheme); /** * @brief * Determines if the control is drawn using visual styles/SkinFramework, * if supported. * @details * This method enables Windows XP visual styles for the control. * This Control will draw using visual styles if both the control * and the operating system support it. * Visual styles and SkinFramework skins are specifications for * the appearance of controls. GetUseVisualStyle determines whether * to use the currently set Windows XP visual style. If using * SkinFramework, then it determines whether to use the currently set * style of the SkinFramework. * @return * TRUE if the currently set Windows XP visual style will be used to * theme the control. If using SkinFramework, then the currently set * style of the SkinFramework will be used to skin the control. * FALSE if the currently set appearance/style in the OS will be used. */ BOOL GetUseVisualStyle() const; /** * @brief * Enables Windows XP visual styles for the control. * @details * This method enables Windows XP visual styles for the control. * This Control will draw using visual styles if both the control * and the operating system support it. * Visual styles and SkinFramework skins are specifications for * the appearance of controls. GetUseVisualStyle determines whether * to use the currently set Windows XP visual style. If using * SkinFramework, then it determines whether to use the currently set * style of the SkinFramework. * @param bUseVisualStyle TRUE if the currently set Windows XP visual style * will be used to theme the control. If using * SkinFramework, then the currently set style of the * SkinFramework will be used to skin the control. * FALSE if the currently set appearance/style in the * OS will be used. */ void SetUseVisualStyle(BOOL bUseVisualStyle = TRUE); public: /** @cond */ void SetCommandBars(void*); DECLARE_MESSAGE_MAP() afx_msg LRESULT OnSetTheme(WPARAM wParam, LPARAM lParam); /** @endcond */ protected: XTPControlTheme m_nTheme; /**< Scrollbar theme. */ BOOL m_bUseVisualStyle; /**< TRUE to use Visual Styles. */ }; /** @cond */ AFX_INLINE BOOL CXTPScrollBar::GetUseVisualStyle() const { return m_bUseVisualStyle; } /** @endcond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSCROLLBAR_H__) /** @endcond */