Click here to Skip to main content
11,501,956 members (72,461 online)
Click here to Skip to main content
Add your own
alternative version

Address Book

, 6 Aug 2000 CPOL 231.2K 5K 93
Address Book application
// GfxColumnManager.h: interface for the CGfxColumnManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GFXCOLUMNMANAGER_H__BA849A59_FED4_11D1_83D4_0000B43382FE__INCLUDED_)
#define AFX_GFXCOLUMNMANAGER_H__BA849A59_FED4_11D1_83D4_0000B43382FE__INCLUDED_

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

class CGfxListCtrl;

class CGfxColumnManager  
{
public:
	CGfxColumnManager();
	CGfxColumnManager(const CGfxColumnManager * p);
	virtual ~CGfxColumnManager();
	int DefineColumn(const int iId, const char * cText, const char * cTextDt = NULL, const int iAlign = LVCFMT_LEFT, const int iWidth = 80, DWORD dwData = 0, const int iImage = -1, const char * cDescr = NULL);

public:
	bool LinkRecordset(const int iId, CDaoRecordset * ps, const int iLnk, const int iTxtLnk);
	bool IsDefColumn(const int iId) const;
	int FindColumnById(const int iId) const;
	bool CustomizeColumn(CGfxListCtrl * pList, CWnd * pParent = NULL);
	bool SetupColumnData(CGfxListCtrl * pList, const bool bNeedOwnerDraw = false);
	bool RetrieveColumnData(CGfxListCtrl * pList);
	bool DefineDefaultColumns(const int iCount, const int * iCols);
	void ReadFromProfile(const char * cListName);
	void WriteToProfile(const char * cListName);
	class CGfxColumn
	{
	public:
		void Clear();
		void Init(const int _iId, const char * _cText, const char * _cTextDt, const int _iAlign, const int _iWidth, DWORD _dwData, const int _iImage, const char * _cDescr);
		CGfxColumn();
		virtual ~CGfxColumn();

		int iId, iAlign, iWidth, iImage;
		DWORD dwData;
		char * cText, * cTextDt, * cDescr;

		CDaoRecordset * pSet;
		int				iLinkField, iTextField;
	};

	int			 iColumnData;
	CGfxColumn * pColumnData;

	int			 iDefColumn;
	int	*		 pDefColumn;
};

#endif // !defined(AFX_GFXCOLUMNMANAGER_H__BA849A59_FED4_11D1_83D4_0000B43382FE__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service 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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Xavier John
Software Developer
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 7 Aug 2000
Article Copyright 1999 by Xavier John
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid