home *** CD-ROM | disk | FTP | other *** search
- // DataView.h : header file
- //
-
- /////////////////////////////////////////////////////////////////////////////
- // CDataView view
- class CBrowserDoc;
-
- class CDataView : public CListView
- {
- protected:
- void SetParams( CDaoQueryDef * pQDef );
- CDataView(); // protected constructor used by dynamic creation
- DECLARE_DYNCREATE(CDataView)
-
- // Attributes
- public:
- void FindQueryData( CString & strCriteria );
- void LoadData( CString * pstrCriteria = 0 );
- void LoadHeaders( );
- CBrowserDoc * GetDocument( );
- BOOL SetData( CDaoDatabase * pDB, const CString & name, const int nType );
- CDaoDatabase * m_pDB;
- CDaoRecordset * m_pRecordset;
- CDaoQueryDef * m_pQuery;
- CDaoTableDef * m_pTable;
-
- enum{ TABLE = 0, QUERY, FIND }; //Make the code more readable
-
- // Operations
- public:
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDataView)
- protected:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
- virtual ~CDataView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CDataView)
- afx_msg void OnPageDown();
- afx_msg void OnPageFirst();
- afx_msg void OnPageLast();
- afx_msg void OnPageUp();
- afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
- //}}AFX_MSG
- afx_msg long OnHeadClick( UINT = 0, long = 0 );
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
-