Click here to Skip to main content
15,891,734 members
Articles / Desktop Programming / MFC

DTX - Database Toolbox For MFC Ver 1.8 (Freeware Version)

Rate me:
Please Sign up or sign in to vote.
3.88/5 (8 votes)
2 Apr 20024 min read 106.5K   3.6K   56  
DTX is a set of classes for editing and automatic read, write and display of datatabase fields, as well as 70+ ready to use classes
#if !defined(AFX_DBGRIDCTRL_H__B372CCE9_0B05_4C91_BE62_7E016E6EA6DB__INCLUDED_)
#define AFX_DBGRIDCTRL_H__B372CCE9_0B05_4C91_BE62_7E016E6EA6DB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// dbgridctrl.h : header file
//

#include <ALXGridCtrl.h>
#include <DTXBase.h>

#if !defined(AFX_DTXTABLE_H_INCLUDED_)
#include <DTXTable.h>
#endif

/////////////////////////////////////////////////////////////////////////////
// CDBGridCtrl window

class CDBGridCtrl : public CALXGridCtrl, public CDTXEditBase
{
	BOOL m_FrDTXDBGridCtrl;
	CDBColArray m_Cols;
// Construction
public:
	CDBGridCtrl();

// Attributes
public:
	void AddColumn(DBColumn* nColumn);

	virtual int GetFixedRowCount()
	{ return 1; }

	virtual int GetFixedColCount()
	{ return 1; }

	virtual void TableDataChange();
	virtual void TableClosed();
	virtual void TableOpened();
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDBGridCtrl)
	//}}AFX_VIRTUAL
	virtual CELL_DATA GetCellData(int nCol, int nRow);
	virtual BOOL OnSaveCellData(int nCol, int nRow);
// Implementation
protected:
	void CreateCols();
	virtual void OnSetActiveCell(int nCol, int nRow);
public:
	virtual ~CDBGridCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CDBGridCtrl)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

class CDTXDBGridCtrl : public CDBGridCtrl, public CDTXWndBase
{
protected:
	//{{AFX_MSG(CDTXDBGridCtrl)
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void DrawBorder(bool fHot = TRUE);
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DBGRIDCTRL_H__B372CCE9_0B05_4C91_BE62_7E016E6EA6DB__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 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


Written By
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions