/** * @file XTPListCtrlView.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(__XTPLISTVIEW_H__) # define __XTPLISTVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" DECLARE_LIST_BASE(CXTPListViewBase, CListView, CXTPListBase) DECLARE_LIST_BASE(CXTPListCtrlBase, CListCtrl, CXTPListBase) /** * @brief * CXTPListView is a multiple inheritance class derived from CListView and * CXTPListBase. This class implements a flat header and generic sorting routines. * @see * CXTPListBase */ class _XTP_EXT_CLASS CXTPListView : public CXTPListViewBase { /** @cond */ DECLARE_DYNCREATE(CXTPListView) /** @endcond */ public: /** * @brief * Constructs a CXTPListView object. */ CXTPListView(); /** * @brief * Destroys a CXTPListView object, handles cleanup and deallocation. */ virtual ~CXTPListView(); protected: DECLARE_MESSAGE_MAP() }; /** * @brief * CXTPListCtrl is a multiple inheritance class derived from CListCtrl and * CXTPListBase. This class implements a flat header and generic sorting * routines. See CXTPListBase for additional functionality. * @see * CXTPListBase */ class _XTP_EXT_CLASS CXTPListCtrl : public CXTPListCtrlBase { /** @cond */ DECLARE_DYNAMIC(CXTPListCtrl) /** @endcond */ public: /** * @brief * Constructs a CXTPListCtrl object. */ CXTPListCtrl(); /** * @brief * Destroys a CXTPListCtrl object, handles cleanup and deallocation. */ virtual ~CXTPListCtrl(); protected: DECLARE_MESSAGE_MAP() }; /** * @brief * An adaptor for any CListCtrl derived control that overrides standard * scrollbars with custom scrollbars. * @param ListBase Base CListCtrl derived class name. * @see * CXTPScrollable */ template class CXTPScrollableListCtrlT : public CXTPScrollable { public: /** * @brief * Initializes a scrollable control instance. */ CXTPScrollableListCtrlT(); using CXTPScrollable::GetRuntimeClass; protected: /** @cond */ virtual BOOL HasVScroll(DWORD dwStyle, DWORD dwExStyle) const; virtual BOOL HasHScroll(DWORD dwStyle, DWORD dwExStyle) const; virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult); /** @endcond */ }; /** * @brief * Type alias for a CXTPListCtrl derived scrollable control. */ typedef CXTPScrollableListCtrlT CXTPScrollableListCtrl; /** @cond */ template AFX_INLINE CXTPScrollableListCtrlT::CXTPScrollableListCtrlT() { _ASSERTE(GetRuntimeClass()->IsDerivedFrom(RUNTIME_CLASS(CListCtrl))); } template AFX_INLINE BOOL CXTPScrollableListCtrlT::HasVScroll(DWORD dwStyle, DWORD dwExStyle) const { UNREFERENCED_PARAMETER(dwExStyle); return 0 == (dwStyle & LVS_NOSCROLL); } template AFX_INLINE BOOL CXTPScrollableListCtrlT::HasHScroll(DWORD dwStyle, DWORD dwExStyle) const { UNREFERENCED_PARAMETER(dwExStyle); return 0 == (dwStyle & LVS_NOSCROLL); } _XTP_EXT_CLASS BOOL AFXAPI XTPOnScrollableListCtrlWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult, CWnd* pEmbeddedControl); template AFX_INLINE BOOL CXTPScrollableListCtrlT::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult) { if (XTPOnScrollableListCtrlWndMsg(message, wParam, lParam, pResult, CXTPScrollHost::GetEmbeddedControl())) return TRUE; return CXTPScrollable::OnWndMsg(message, wParam, lParam, pResult); } /** @endcond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // #if !defined(__XTPLISTVIEW_H__) /** @endcond */