Database ODBC With File Support
Database ODBC With File Support
#if !defined(AFX_DATABASEDOC_H__6C43D46F_106D_40AE_8F64_358A1D70937C__INCLUDED_)
#define AFX_DATABASEDOC_H__6C43D46F_106D_40AE_8F64_358A1D70937C__INCLUDED_
#include "Db1set.h"
// Attributes
public:
CDb1set m_nset;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDatabaseDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CDatabaseDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
//{{AFX_MSG(CDatabaseDoc)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DATABASEDOC_H__6C43D46F_106D_40AE_8F64_358A1D70937C__INCLUDED_)
#if !defined(AFX_DATABASEVIEW_H__36D67C14_8C60_42AB_8C10_7AE35FBBB52F__INCLUDED_)
#define AFX_DATABASEVIEW_H__36D67C14_8C60_42AB_8C10_7AE35FBBB52F__INCLUDED_
// Attributes
public:
CDatabaseDoc* GetDocument();
CDb1set *m_pset;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDatabaseView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CDatabaseView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !
defined(AFX_DATABASEVIEW_H__36D67C14_8C60_42AB_8C10_7AE35FBBB52F__INCLUDED_)
#include "stdafx.h"
#include "database.h"
#include "Db1set.h"
#include "databaseDoc.h"
#include "databaseView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// CDatabaseView
IMPLEMENT_DYNCREATE(CDatabaseView, CScrollView)
BEGIN_MESSAGE_MAP(CDatabaseView, CScrollView)
//{{AFX_MSG_MAP(CDatabaseView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
END_MESSAGE_MAP()
// CDatabaseView construction/destruction
CDatabaseView::CDatabaseView()
{}
CDatabaseView::~CDatabaseView()
{}
// CDatabaseView drawing
void CDatabaseView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CSize sizeTotal;
sizeTotal.cx = sizeTotal.cy = 100;
SetScrollSizes(MM_TEXT, sizeTotal);
m_pset=&GetDocument()->m_nset;
if(m_pset->IsOpen())
{
m_pset->Close();
}
m_pset->Open();
}
// CDatabaseView printing
// CDatabaseView diagnostics
#ifdef _DEBUG
void CDatabaseView::AssertValid() const
{
CScrollView::AssertValid();
}