|
/////////////////////////////////////////////////////////////////////////////
// MainDoc.h : interface of the CMainDoc class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINDOC_H__EMERY_EMERALD__INCLUDED_)
#define AFX_MAINDOC_H__EMERY_EMERALD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//#include "Main.h"
#include "Dbf\Dbf.h"
class CMainApp;
/////////////////////////////////////////////////////////////////////////////
// MainDoc.h : interface of the CMainDoc class
/////////////////////////////////////////////////////////////////////////////
class CMainDoc : public CDocument {
DECLARE_DYNCREATE(CMainDoc)
protected: // Create from serialization only
CMainDoc();
// Attributes
public:
//*** Main application pointer
CMainApp *m_pMainApp;
//*** Table Id
ETABLE m_eTable;
//*** Meta table header structure
META_TABLE m_MetaTable;
//*** Current table
//CListCtrlEx *m_pTable;
//*** Handle of dbf file
HANDLE m_hDbfFile;
//*** Handle of file mapping
HANDLE m_hDbfMap;
//*** Maps view of dbf file for its first part (where are header)
DBF_FILE1 *m_pDbfView1;
//*** Maps view of dbf file for its second part (where are data)
DBF_FILE2 *m_pDbfView2;
//*** Dbf header structure
DBF_HEADER *m_pDbfHdr;
//*** Number of records in dbf file
ULONG m_nRecCount;
//*** Length of one data record (including delete flag)
ULONG m_nRecSize;
//*** Number of fields in dbf file
ULONG m_nFldCount;
//*** Dynamic array of field names of all fields
BYTE **m_aacFldName;
//*** Dynamic array of field types of all fields
BYTE *m_acFldType;
//*** Dynamic array of offsets of all fields
UINT *m_anOff;
//*** Dynamic array of lengths (in bytes) of all fields
BYTE *m_acLen;
//*** Dynamic array of decimal places of all fields
BYTE *m_acDec;
// Operations
public:
//*** Creates current document (dbf) file
BOOL CreateDocumentFile(TCHAR *szDbfName);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainDoc)
public:
//virtual BOOL OnNewDocument();
virtual BOOL OnOpenDocument(LPCTSTR szFileName);
//virtual void Serialize(CArchive &Ar);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMainDoc)
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINDOC_H__EMERY_EMERALD__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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.