/** * @file XTPThemeDLL.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(__XTPTHEMEDLL_H__) /** @cond */ # define __XTPTHEMEDLL_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPThemeDLL is a helper class used to load Codejock theme * resource DLLs. Use XTPThemeDLL() to access the meembers of * this class. * @see * XTPThemeDLL() */ class _XTP_EXT_CLASS CXTPThemeDLL { friend class CXTPSingleton; /** * @brief * Default constructor handles initialization. */ CXTPThemeDLL(); public: /** * @brief * Destructor, handles cleanup and deallocation. */ virtual ~CXTPThemeDLL(); /** * @brief * This member function is called to load the style DLL's from * the specified path. If 'lpszDllPath' is NULL then the application * folder + \\Styles path is used as a default. * @param hAppInstance Instance of application who's path will be used to locate * the 'Styles' folder. Can be NULL when using 'lpszDllPath'. * @param lpszDllPath Path where Codejock theme DLL's are located. * @return * TRUE if one or more of the Codejock theme DLL's were located, * otherwise FALSE. */ BOOL Init(HINSTANCE hAppInstance = NULL, LPCTSTR lpszDllPath = NULL); /** * @brief * Sets the handle to the resource DLL used for Codejock themes. * @param strINI Name of the INI file to be loaded from the * resource DLL. * @return * TRUE if the handle was successfully set, otherwise FALSE. * @see * See XTPResourceImage.h for a list of constants you can use * for strINI. */ BOOL SetHandle(CString strINI); /** * @brief * Resets all properties of ResourceImages */ void Reset(); private: /** * @brief * Internal function used to load Codejock theme .DLLs. * @param hModule Reference to a CXTPModuleHandle object containing the * handle of the loaded theme .DLL. * @param lpszDLLPath Path where the theme .DLLs are located. * @param lpszDllName Name of the theme .DLL to load. * @return * TRUE if the theme .DLL was successfully loaded, otherwise FALSE. */ BOOL LoadThemeDll(CXTPModuleHandle& hModule, LPCTSTR lpszDLLPath, LPCTSTR lpszDllName); CXTPModuleHandle m_hOffice2007; /**< Handle to the Office 2007 theme DLL. */ CXTPModuleHandle m_hOffice2010; /**< Handle to the Office 2010 theme DLL. */ CXTPModuleHandle m_hOffice2013; /**< Handle to the Office 2013 theme DLL. */ CXTPModuleHandle m_hOffice2016; /**< Handle to the Office 2016 theme DLL. */ CXTPModuleHandle m_hVisualStudio2012; /**< Handle to the Visual Studio 2012 theme DLL. */ CXTPModuleHandle m_hVisualStudio2015; /**< Handle to the Visual Studio 2015 theme DLL. */ CXTPModuleHandle m_hVisualStudio2017; /**< Handle to the Visual Studio 2017 theme DLL. */ CXTPModuleHandle m_hVisualStudio2019; /**< Handle to the Visual Studio 2019 theme DLL. */ CXTPModuleHandle m_hVisualStudio2022; /**< Handle to the Visual Studio 2022 theme DLL. */ CXTPModuleHandle m_hWindows7; /**< Handle to the Windows 7 theme DLL. */ CXTPModuleHandle m_hWindows10; /**< Handle to the Windows 10 theme DLL. */ CXTPModuleHandle m_hWindows11; /**< Handle to the Windows 11 theme DLL. */ friend _XTP_EXT_CLASS CXTPThemeDLL* AFX_CDECL XTPThemeDLL(); }; /** * @brief * XTPThemeDLL returns pointer to common CXTPThemeDLL class * @return * Returns pointer to common CXTPThemeDLL class * @see * CXTPThemeDLL */ _XTP_EXT_CLASS CXTPThemeDLL* AFX_CDECL XTPThemeDLL(); # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTHEMEDLL_H__) /** @endcond */