Click here to Skip to main content
15,878,852 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.4K   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_DTXDBLISTCTRL_H__E5094931_27DD_46FD_B17B_B6464272D38D__INCLUDED_)
#define AFX_DTXDBLISTCTRL_H__E5094931_27DD_46FD_B17B_B6464272D38D__INCLUDED_

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

#include "ReportCtrl.h"
#include "dtxlistctrl.h"

#include <DTXBase.h>

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

/////////////////////////////////////////////////////////////////////////////
// CDBListCtrl window

class CDBListCtrl : public CWnd, public CDTXEditBase
{
	BOOL m_FrDTXDBListCtrl;
	INT m_iSelected;
	CDBColArray m_Cols;
// Construction
public:
	CDBListCtrl();

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

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

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDBListCtrl)
	public:
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDBListCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CDBListCtrl)
	afx_msg void OnRvnItemCallback(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRvnSelectionChanged(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnPaint();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

/////////////////////////////////////////////////////////////////////////////
// CDTXDBListCtrl window

class CDTXDBListCtrl : public CDBListCtrl, public CDTXWndBase
{
// Construction
public:
	CDTXDBListCtrl();

// Attributes
public:
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDTXListCtrl)
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	// Generated message map functions
protected:
	//{{AFX_MSG(CDTXDBListCtrl )
	afx_msg void OnPaint();
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	//}}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_DTXDBLISTCTRL_H__E5094931_27DD_46FD_B17B_B6464272D38D__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