gfxcolumnmanager.h

来自「随着计算机信息技术的飞速发展」· C头文件 代码 · 共 48 行

H
48
字号
#ifndef __GFXCOLUMNMANGER_H__
#define __GFXCOLUMNMANGER_H__

class CGfxListCtrl;

class _CJX_EXT_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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?