DatabaseView.h
上传用户:y440e3
上传日期:2010-03-08
资源大小:200k
文件大小:3k
- #if !defined(AFX_DATABASEVIEW_H__26F8BE83_187B_11D3_B40F_98A2DB000000__INCLUDED_)
- #define AFX_DATABASEVIEW_H__26F8BE83_187B_11D3_B40F_98A2DB000000__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // DatabaseView.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CDatabaseView view
- #include "data1ret.h"
- class CDatabaseView : public CScrollView
- {
- protected:
- CDatabaseView(); // protected constructor used by dynamic creation
- DECLARE_DYNCREATE(CDatabaseView)
- private:
- CDataBaseSet* m_pSet;
- Data1Set* m_pSet1;
- CLinkDataSet* m_pLinkSet1;
- short nCharHeight,nCharWidth; //字体的高度和宽度
- int nRecord,nField; //记录集的记录数和字段数
- int nScreenWide,nScreenHeight; //视图的宽度和高度
- short nFieldWide[200]; //每个字段的显示宽度
- short nFieldStart[200]; //每个字段的开始字节
- CSize sizeTotal;
- CSize sizePage;
- CSize sizeLine;
- int nIndex; //当前指向的记录序号
- short nSelectData; //选中的数据对象的序号
- // Attributes
- public:
- CDrawDoc* GetDocument(); //得到文档类的指针
- // Operations
- public:
- void GetRect(int nRow,CRect* r1);
- void Init1();
- void Init2();
- int GetOnlyID();
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDatabaseView)
- protected:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual void OnInitialUpdate(); // first time after construct
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- virtual ~CDatabaseView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- // Generated message map functions
- //{{AFX_MSG(CDatabaseView)
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnRecordAdd();
- afx_msg void OnRecordModify();
- afx_msg void OnRecordFilter();
- afx_msg void OnRecordSort();
- afx_msg void OnRecordDelete();
- afx_msg void OnRecordLink();
- afx_msg void OnRecordDeleteAll();
- afx_msg void OnFileSelect();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in DrawView.cpp
- inline CDrawDoc* CDrawView::GetDocument()
- { return (CDrawDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_DATABASEVIEW_H__26F8BE83_187B_11D3_B40F_98A2DB000000__INCLUDED_)