ImageDBView.h
资源名称:ImageDB.rar [点击查看]
上传用户:bst807
上传日期:2022-07-10
资源大小:74k
文件大小:2k
源码类别:
数据库编程
开发平台:
Visual C++
- // ImageDBView.h : interface of the CImageDBView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #include "ImageDBDoc.h"
- #if !defined(AFX_IMAGEDBVIEW_H__D0E44359_9527_4CE7_B2F6_F1F9C3F3030C__INCLUDED_)
- #define AFX_IMAGEDBVIEW_H__D0E44359_9527_4CE7_B2F6_F1F9C3F3030C__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CImageDBView : public CFormView
- {
- protected: // create from serialization only
- CImageDBView();
- DECLARE_DYNCREATE(CImageDBView)
- public:
- //{{AFX_DATA(CImageDBView)
- enum{ IDD = IDD_IMAGEDB_FORM };
- // NOTE: the ClassWizard will add data members here
- //}}AFX_DATA
- // Attributes
- public:
- CImageDBDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CImageDBView)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- 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);
- virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnDraw(CDC* pDC);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- bool m_bImageOpen;
- void DrawPhotoFromDB();
- void DrawPhotoFromFile(CString FileName);
- CString m_FileName;
- int m_bDraw;
- _variant_t m_varBLOB;
- _StreamPtr m_pStream;
- void Image_DB(BOOL bImageToDB, LPCTSTR lpszFileName, _RecordsetPtr pRecordset, LPCTSTR lpszColumn);
- virtual ~CImageDBView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CImageDBView)
- afx_msg void OnButton1();
- afx_msg void OnButton2();
- afx_msg void OnButton3();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in ImageDBView.cpp
- inline CImageDBDoc* CImageDBView::GetDocument()
- { return (CImageDBDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_IMAGEDBVIEW_H__D0E44359_9527_4CE7_B2F6_F1F9C3F3030C__INCLUDED_)