/** * @file XTPCustomizePageToolbars.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(__XTPCUSTOMIZETOOLBARSPAGE_H__) && defined(_XTP_INCLUDE_CONTROLS) # define __XTPCUSTOMIZETOOLBARSPAGE_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPCustomizeSheet; class CXTPWinThemeWrapper; /** @cond */ class _XTP_EXT_CLASS CXTPCustomizeToolbarsPageCheckListBox : public CCheckListBox { public: CXTPCustomizeToolbarsPageCheckListBox(); ~CXTPCustomizeToolbarsPageCheckListBox(); protected: BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult); void PreDrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); void PreSubclassWindow(); LRESULT OnSetFont(WPARAM, LPARAM); DECLARE_MESSAGE_MAP() protected: CXTPWinThemeWrapper* m_themeHelper; CSize m_sizeCheck; }; /** @endcond */ /** * @brief * CXTPCustomizeToolbarsPage is a CPropertyPage derived class. * It represents the Toolbars page of the Customize dialog. */ class _XTP_EXT_CLASS CXTPCustomizeToolbarsPage : public CXTPPropertyPage { /** @cond */ DECLARE_DYNCREATE(CXTPCustomizeToolbarsPage) /** @endcond */ public: /** * @brief * Constructs a CXTPCustomizeToolbarsPage object * * @param pSheet Points to a CXTPCustomizeSheet object that this page * belongs to. */ CXTPCustomizeToolbarsPage(CXTPCustomizeSheet* pSheet = NULL); /** * @brief * Destroys a CXTPCustomizeToolbarsPage object, handles cleanup * and deallocation. */ ~CXTPCustomizeToolbarsPage(); public: /** * @brief * Displays or hides the new toolbar button. * * @param bEnable TRUE to allow display the add new toolbar button, FALSE to hide it. */ void AllowNewToolbars(BOOL bEnable); protected: /** @cond */ DECLARE_MESSAGE_MAP() //{{AFX_VIRTUAL(CXTPCustomizeToolbarsPage) virtual void DoDataExchange(CDataExchange* pDX); BOOL OnInitDialog(); //}}AFX_VIRTUAL //{{AFX_MSG(CXTPCustomizeToolbarsPage) afx_msg void OnSelectionChanged(); afx_msg void OnChkChange(); afx_msg void OnNewToolbar(); afx_msg void OnRenameToolbar(); afx_msg void OnDeleteToolbar(); afx_msg void OnResetToolbar(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); //}}AFX_MSG /** @endcond */ private: void RefreshToolbarsList(); public: enum { IDD = XTP_IDD_PAGE_TOOLBARS /**< Property page identifier*/ }; CXTPCustomizeSheet* m_pSheet; /**< Parent property sheet*/ # ifdef _XTP_INCLUDE_CONTROLS COLORREF m_clrText; CXTPButton m_btnReset; /**< Reset button*/ CXTPButton m_btnRename; /**< Rename button*/ CXTPButton m_btnDelete; /**< Delete button*/ CXTPButton m_btnNew; /**< New button*/ CXTPCheckListBox m_checkList; /**< Toolbars list box*/ # else CButton m_btnReset; /**< Reset button*/ CButton m_btnRename; /**< Rename button*/ CButton m_btnDelete; /**< Delete button*/ CButton m_btnNew; /**< New button*/ CXTPCustomizeToolbarsPageCheckListBox m_checkList; /**< Toolbars list box*/ # endif protected: BOOL m_bAllowNewToolbars; /**< TRUE to allow display the add new toolbar button, FALSE to hide it.*/ }; AFX_INLINE void CXTPCustomizeToolbarsPage::AllowNewToolbars(BOOL bEnable) { m_bAllowNewToolbars = bEnable; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(__XTPCUSTOMIZETOOLBARSPAGE_H__) /** @endcond */