⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdlgoracleimagerwdlg.h

📁 这是书上的代码
💻 H
字号:
// CDlgOracleImageRWDlg.h : header file
//

#if !defined(AFX_CDLGORACLEIMAGERWDLG_H__F82D2C11_CB54_4EF3_B641_033A13AF214E__INCLUDED_)
#define AFX_CDLGORACLEIMAGERWDLG_H__F82D2C11_CB54_4EF3_B641_033A13AF214E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CCDlgOracleImageRWDlg dialog
#include "oracl.h"
#include <iostream.h>
#include <fstream.h>
class CCDlgOracleImageRWDlg : public CDialog
{
// Construction
public:
	CCDlgOracleImageRWDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CCDlgOracleImageRWDlg)
	enum { IDD = IDD_CDLGORACLEIMAGERW_DIALOG };
	CString	m_ID;
	CString	m_Name;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCDlgOracleImageRWDlg)
	public:
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CCDlgOracleImageRWDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnPrevioususer();
	afx_msg void OnNextuser();
	afx_msg void OnSave();
	afx_msg void OnAddPhoto();
	afx_msg void OnDeletePhoto();
	afx_msg void OnSelectphoto();
	afx_msg void OnDestroy();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	//数据库
	ODatabase odb;
	//动态集
	ODynaset odyn;
private:
	void LoadBMP();
	//从Oracle数据库中读出像片数据
	void ReadData();
	//从Oracle数据库中读出图像并生成BMP格式的图片
	HBITMAP BufferToHBITMAP();
	//从文件系统中打开BMP图像
	BOOL LoadBMPFile(const char* pBMPPathname);
	//将图像显示在对话框控件中
	void	DrawUserPhoto(int x, int y, CDC *pDC);
	
	//重置状态
	void ResetControls();
	//销毁图像
	void DestroyPhoto();
	
	//主框架指针
	CWnd			*pMainWnd;
	//图像是否更改标志
	BOOL			m_bModify;
	//是否是新图像
	BOOL			m_bNewImage;
	//图像句柄
	HBITMAP			m_hPhotoBitmap;
	//图像长度
	DWORD			m_nFileLen;
	//指向图像内存指针
	char			*m_pBMPBuffer;
	//图像路径
	CString			pathname;
	//图像宽度
	int width;
	//图像高度
	int height;
};


//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CDLGORACLEIMAGERWDLG_H__F82D2C11_CB54_4EF3_B641_033A13AF214E__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -