www.pudn.com > MyImageDB(imageobject).rar > DataGridView.h


//{{AFX_INCLUDES() 
#include "datagrid.h" 
#include "include\ado.h" 
#include "myimagedbdoc.h" 
//}}AFX_INCLUDES 
#if !defined(AFX_DATAGRIDVIEW_H__73E2603C_98B0_40B4_8B8B_B0383E6A289C__INCLUDED_) 
#define AFX_DATAGRIDVIEW_H__73E2603C_98B0_40B4_8B8B_B0383E6A289C__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
// DataGridView.h : header file 
// 
 
///////////////////////////////////////////////////////////////////////////// 
// CDataGridView form view 
 
#ifndef __AFXEXT_H__ 
#include  
#endif 
#include  
//#include "myimagedbdoc.h" 
 
class CDataGridView : public CFormView 
{ 
protected: 
	CDataGridView();           // protected constructor used by dynamic creation 
	DECLARE_DYNCREATE(CDataGridView) 
 
// Form Data 
public: 
	//{{AFX_DATA(CDataGridView) 
	enum { IDD = IDD_GRID_VIEW }; 
	CDataGrid	m_ctlDataGrid; 
	CDataGrid	myRegionclassInfoGrid; 
	CDataGrid	myPointsInfoGrid; 
	//}}AFX_DATA 
 
// Attributes 
public: 
	//void UpdateData(); 
    void UpdateGridDetails(const CString& sTableName);//刷新所有三个表格数据; 
	void UpdateTrainPointsGrid();//刷新训练点表格; 
	void UpdateExistsClassGrid();//刷新现有分割类表格; 
 
	COleDropTarget myDropTarget; 
 
 
// Operations 
public: 
	CMyImageDBDoc* CDataGridView::GetDocument(); 
 
protected: 
	LONG selRow; 
	BOOL mousePressed; 
	LONG deleteID;//将被删除的记录ID号; 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CDataGridView) 
	public: 
	virtual void OnInitialUpdate(); 
	virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point); 
	virtual void OnDragLeave(); 
	virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject, DWORD dwKeyState, CPoint point); 
	virtual BOOL OnDrop(COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point); 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	virtual ~CDataGridView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
	// Generated message map functions 
	//{{AFX_MSG(CDataGridView) 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnSelChangeDatagrid1(short FAR* Cancel); 
	afx_msg void OnMouseDownDatagrid1(short Button, short Shift, long X, long Y); 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnDblClickDatagrid1(); 
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnAfterDeleteDatagrid1(); 
	afx_msg void OnBeforeDeleteDatagrid1(short FAR* Cancel); 
	afx_msg void OnKeyDownDatagrid1(short FAR* KeyCode, short Shift); 
	afx_msg void OnDblClickPointsinfogrid(); 
	afx_msg void OnKeyDownPointsinfogrid(short FAR* KeyCode, short Shift); 
	DECLARE_EVENTSINK_MAP() 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
 
    _RecordsetPtr m_pRS;//图像数据库记录集; 
	_RecordsetPtr seginfoRS;//区域分割信息记录集; 
	_RecordsetPtr trainPointsRS;//区域分割信息记录集; 
 
    CString GetErrorDescription(_com_error& e); 
 
    bool m_bAllowNew; 
    bool m_bAllowEdit; 
    bool m_bAllowDelete; 
 
}; 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_DATAGRIDVIEW_H__73E2603C_98B0_40B4_8B8B_B0383E6A289C__INCLUDED_)