/** * @file XTPDatePickerResourceTheme.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 * */ #if !defined(_XTPDATEPICKERRESOURCETHEME_H__) # define _XTPDATEPICKERRESOURCETHEME_H__ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * Class CXTPDatePickerThemeResource is derived from CXTPDatePickerPaintManager * for rendering a Resource DLL style for DatePicker control. * * Example: *
 *  if (m_bThemeResource)
 *  {
 *     CXTPDatePickerThemeResource* pThemeResource = new CXTPDatePickerThemeResource;
 *     m_wndDatePicker.SetTheme(pThemeResource);
 *  }
 *  else
 *  {
 *     m_wndDatePicker.SetTheme(NULL);
 *  }
 * 
* * @see CXTPDatePickerThemeResource */ class _XTP_EXT_CLASS CXTPDatePickerThemeResource : public CXTPDatePickerPaintManager { public: /** * @brief * Default paint manager constructor. * * @details Handles initial initialization. * * @see RefreshMetrics() */ CXTPDatePickerThemeResource(); /** * @brief * Default paint manager destructor. * * @details Handles member item deallocation. */ virtual ~CXTPDatePickerThemeResource(); /** * @brief * This member function performs initialization for the Paint * Manager. * * @details Initializes all drawing defaults (fonts, colors, etc.). Most of * defaults are system defaults. */ virtual void RefreshMetrics(); /** * @brief * This member function is used to draw the control's buttons. * * @param pDC Pointer to a valid device context. * @param rcButton A CRect that contains the button area bounding * rectangle coordinates. * @param strButton A CString that contains the string of the button's * text. * @param bIsDown A BOOL that determines if the button is down or up. * @param bIsHighLight A BOOL that determines if the button is highlighted. * * @details Use this member function to draw buttons in the appropriate state. * The state depends on the bIsDown parameter, the button may be * drawn pressed or released. Furthermore, depending on the * bIsHighLight, the button may be drawn with highlighted borders. * * Example: *
	 * for (int i = 0; i \< GetButtonCount(); i++)
	 * {
	 * CXTPDatePickerButton* pButton = GetButton(i);
	 * if (pButton-\>m_bVisible)
	 *    DrawButton(pDC, pButton-\>m_rcButton, pButton-\>m_strCaption,
	 *    pButton-\>m_bPressed, pButton-\>m_bHighlight);
	 * }
	 * 
*/ virtual void DrawButton(CDC* pDC, const CRect& rcButton, const CString& strButton, BOOL bIsDown, BOOL bIsHighLight); protected: /** * @brief * Call this member function to return the COLORREF value for the specified * color name located in the Resource DLL INI file. * * @param pcszColorName A text string representing the color name specified in the Resource DLL * @param clrDefault Default RGB value to be returned if the color was not found in * the Resource DLL. * @return An RGB COLORREF value representing the color name if located in the Resource * DLL, otherwise returns the specified default color. */ COLORREF GetResourceColor(LPCTSTR pcszColorName, COLORREF clrDefault); }; # define CXTPDatePickerThemeOffice2007 CXTPDatePickerThemeResource # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(_XTPDATEPICKERRESOURCETHEME_H__)