Click here to Skip to main content
Click here to Skip to main content

Project Line Counter Add-In v2.10 for VS.NET and VC6

By , 29 Jun 2003
 
linecount_dll.zip
LineCount.chm
LineCount.dll
WWhizInterface.mod
linecount_src.zip
ExtrnSrc
Help
arrowrt.gif
Index.hhk
LineCount.chm
LineCount.hhp
mailto.gif
metl011.gif
PLC.gif
small_exclamation.gif
TOC.hhc
weblink.gif
LineCount.clw
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
LineCount_VC5.dsp
LineCount_VC5.dsw
Release
LineCount.chm
LineCount.dll
WWhizInterface.mod
res
idr_main.ico
project.ico
TBarLrge.bmp
TBarMedm.bmp
title.ico
plc110src.zip [file error]
plc111.zip
LineCount.chm
LineCount.dll
WWhizInterfaceInstaller210Beta1.exe
plc111src.zip
LineCount.chm
LineCount.dll
Source
Debug
WWhizInterface2D.mod
ExtrnSrc
Help
.cvsignore
arrowrt.gif
Index.hhk
LineCount.hhp
mailto.gif
metl011.gif
PLC.gif
small_exclamation.gif
TOC.hhc
weblink.gif
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
LineCount_VC5.dsp
LineCount_VC5.dsw
res
idr_main.ico
project.ico
TBarLrge.bmp
TBarMedm.bmp
title.ico
WWhizInterfaceInstaller210Beta1.exe
plc150.zip
LineCount.chm
LineCount.dll
Reports
SampleAnalysis.xls
Simple-BW.xsl
Simple-Color.xsl
WWhizInterfaceInstaller212.exe
plc150src.zip
LineCount.chm
LineCount.dll
SampleAnalysis.xls
Simple-BW.xsl
Simple-Color.xsl
WWhizInterface2D.mod
.cvsignore
arrowrt.gif
Index.hhk
info_dot_small.gif
linecount.hhp
mailto.gif
PLC.gif
small_exclamation.gif
TOC.hhc
weblink.gif
LineCount.clw
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
HdrDownA.bmp
HdrUpA.bmp
idr_main.ico
info.ico
project.ico
TBarLrge.bmp
TBarMedm.bmp
title.ico
WWhizInterfaceInstaller212.exe
plc200.zip
LineCount.cab
WWhizInterface30VC6_1016.exe
plc200src.zip
.cvsignore
WWhizInterface2D.mod
ResizableLib
.cvsignore
ResizableLib.dsp
ResizableLib.dsw
.cvsignore
arrowrt.gif
Index.hhk
info_dot_small.gif
LineCount.hhp
mailto.gif
PLC.gif
small_exclamation.gif
TOC.hhc
weblink.gif
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
ObjModelVC6
ObjModelVC7
dte.tlh
MSADDNDR.tlh
MSO.tlh
HdrDownA.bmp
HdrUpA.bmp
idr_main.ico
info.ico
lcgo.bmp
LineCountVC6.rgs
LineCountVC7.rgs
project.ico
TBarLrge.bmp
TBarMedm.bmp
title.ico
plc210.zip
SetupPLC210.exe
plc210src.zip
.cvsignore
WWhizInterface2D.mod
.cvsignore
ResizableLib.dsp
ResizableLib.dsw
.cvsignore
arrowrt.gif
Index.hhk
info_dot_small.gif
LineCount.hhp
mailto.gif
PLC.gif
small_exclamation.gif
TOC.hhc
weblink.gif
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
dte.tlh
MSADDNDR.tlh
MSO.tlh
gallery.xsl
HdrDownA.bmp
HdrUpA.bmp
idr_main.ico
info.ico
lcgo.bmp
LineCountVC6.rgs
LineCountVC7.rgs
project.ico
TBarLrge.bmp
TBarMedm.bmp
title.ico
// SortClass.h : header file
//

#ifndef __SORTCLASS_H__
#define __SORTCLASS_H__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

enum SORT_TYPE{ 
	TYPE_TEXT,
	TYPE_NUMERIC,
	TYPE_DATE,
	TYPE_CHECKBOX
};

class CSortClass
{
public:
	CSortClass(CListCtrl* _pWnd, const int _iCol, const SORT_TYPE _sortType);
	//CSortClass(CListCtrl * _pWnd, const int _iCol, const bool _bIsNumeric, int iStartingItem, int iEndingItem );
	virtual ~CSortClass();		
	
	int iCol;	
	int m_iStartingItem;
	int m_iEndingItem;

	CListCtrl* pWnd;


	SORT_TYPE m_sortType;
	
	//bool bIsNumeric;
	
	void Sort(const bool bAsc);	

	//TEXT
	static int CALLBACK CompareAsc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareDes(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	//NUMERIC
	static int CALLBACK CompareAscNumeric(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareDesNumeric(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	//DATE
	static int CALLBACK CompareAscDate(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareDesDate(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	//CHECKBOX
	static int CALLBACK CompareAscCheck(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
	static int CALLBACK CompareDesCheck(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);

public:	
	static void CString_Replace(CString& cStr, LPCTSTR cToReplace, LPCTSTR cWithWhat);

	//we need this one to mark the last item that we want at the bottom
	class CSortItemGeneric
	{
		BOOL m_bLast;
	public:
		virtual ~CSortItemGeneric() {}
		CSortItemGeneric(const CListCtrl* _pWnd, const int _iRow);

		static int CheckLast( CSortItemGeneric* i1, CSortItemGeneric* i2 );
		const BOOL IsLast();
	};

	class CSortItem	: public CSortItemGeneric
	{	
	public:		
		virtual ~CSortItem() {}
		CSortItem(const DWORD _dw, const CString &_txt, const CListCtrl* _pWnd, const int _iRow);
		CString txt;		
		DWORD dw;	
	};
	class CSortItemNumeric : public CSortItemGeneric
	{	
	public:
		virtual ~CSortItemNumeric()	{}
		CSortItemNumeric(const DWORD _dw, const CString &_txt, const CListCtrl* _pWnd, const int _iRow);
		double dNum;
		DWORD dw;	
	};
	class CSortItemDate	: public CSortItemGeneric
	{	
	public:
		virtual ~CSortItemDate() {}
		CSortItemDate(const DWORD _dw, const CString &_txt, const CListCtrl* _pWnd, const int _iRow);
		COleDateTime oTime;
		DWORD dw;	
	};
	class CSortItemCheck : public CSortItemGeneric
	{	
	public:
		virtual ~CSortItemCheck() {}
		CSortItemCheck(const DWORD _dw, const CListCtrl* _pWnd, const int _iRow);
		BOOL bCheck;
		DWORD dw;	
	};
};

#endif //__SORTCLASS_H__

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Oz Solomon
Experion
Canada Canada
Member
You may know Oz from his WndTabs days. Oz has long since left client side development to work on web technologies and to consult in the R&D management field.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 30 Jun 2003
Article Copyright 2000 by Oz Solomon
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid