/** * @file XTPSystemMetrics.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(__XTPSYSTEMMETRICS_H__) # define __XTPSYSTEMMETRICS_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * The CXTPSystemMetrics class is used to store and update sytem information. */ class _XTP_EXT_CLASS CXTPSystemMetrics { friend class CXTPSingleton; public: /** * @brief * Call this member to refresh the metrics for this class. */ CXTPSystemMetrics(); /** * @brief * Call this member to refresh the metrics for this class. */ void RefreshMetrics(); public: int m_nBorderY; /**< The height of a window border, in pixels. */ int m_nCaptionY; /**< The height of a caption area, in pixels. */ int m_nSizeFrameY; /**< The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. */ int m_nSmallIconX; /**< Small icon width, see SM_CXSMICON. */ int m_nSmallIconY; /**< Small icon height, see SM_CYSMICON. */ int m_nIconX; /**< Icon width see, SM_CXICON. */ int m_nIconY; /**< Icon height see, SM_CYICON. */ CSize GetSmallIconSize() const; /* Small icon width and height. */ CSize GetIconSize() const; /* Icon width and height. */ }; /** @cond */ AFX_INLINE CSize CXTPSystemMetrics::GetSmallIconSize() const { return CSize(m_nSmallIconX, m_nSmallIconY); } AFX_INLINE CSize CXTPSystemMetrics::GetIconSize() const { return CSize(m_nIconX, m_nIconY); } _XTP_EXT_CLASS CXTPSystemMetrics* AFX_CDECL XTPSystemMetrics(); /** @endcond */ /** * @brief * The CXTPDeviceCaps class is used to store and update sytem information. */ class _XTP_EXT_CLASS CXTPDeviceCaps { friend class CXTPSingleton; public: /** * @brief * Call this member to refresh the metrics for this class. */ CXTPDeviceCaps(); /** * @brief * Call this member to refresh the metrics for this class. */ void RefreshMetrics(); public: int m_nLogPixelsX; /**< X location, see LOGPIXELSX. */ int m_nLogPixelsY; /**< Y location, see LOGPIXELSY. */ }; _XTP_EXT_CLASS CXTPDeviceCaps* AFX_CDECL XTPDeviceCaps(); # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSYSTEMMETRICS_H__) /** @endcond */