// SortClass.h: interface for the CSortClass class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_SORTCLASS_H__F6A11049_2233_4012_BAF0_9D9BD19DB175__INCLUDED_) #define AFX_SORTCLASS_H__F6A11049_2233_4012_BAF0_9D9BD19DB175__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifdef BUILD_UTILITYDLL #define UTILITYDLL __declspec(dllexport) #else #define UTILITYDLL __declspec(dllimport) #endif #include class UTILITYDLL CSortClass { public: enum EDataType {dtNULL, dtINT, dtSTRING, dtDATETIME, dtDEC}; CSortClass(CListCtrl * _pWnd, const int _iCol, const int nStartRow); virtual ~CSortClass(); void Sort(bool bAsc, EDataType _dtype); static int m_nStaticStartRow; protected: CListCtrl * pWnd; static int CALLBACK Compare(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); struct CSortItem { CSortItem(const DWORD _dw, const CString &_txt, const int _nRow); DWORD dw; CString txt; int nRow; }; int m_nStartRow; }; #endif // !defined(AFX_SORTCLASS_H__F6A11049_2233_4012_BAF0_9D9BD19DB175__INCLUDED_)