www.pudn.com > vc应用ADO读取数据库中内容包括图片.rar > StudentAccessDlg.h
// StudentAccessDlg.h : header file
//
#include "EditAdd1.h"
#include "SelectFileDlg.h"
#if !defined(AFX_STUDENTACCESSDLG_H__69525B29_94C5_47E9_A45F_27E40DC06EF7__INCLUDED_)
#define AFX_STUDENTACCESSDLG_H__69525B29_94C5_47E9_A45F_27E40DC06EF7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CStudentAccessDlg dialog
class CStudentAccessDlg : public CDialog
{
// Construction
public:
void ExecuteSql(CString strSql);
void ReadParameter();
void SelectRecordset(_RecordsetPtr pRecordset, CString strTableName);
bool OpenConnection(CString strFileName);
BOOL DestroyWindow();
// 定义ADO连接变量指针
_ConnectionPtr m_pConnection;
// 定义ADO连接、命令、记录集变量指针
_RecordsetPtr m_pRecordset;
_RecordsetPtr m_pRecordsetPara;
//处理bmp文件
HBITMAP m_hPhotoBitmap;
DWORD m_nFileLen;
char *m_pBMPBuffer;
void DestroyPhoto();
BOOL LoadBMPFile(const char *pBMPPathname);
HBITMAP BufferToHBITMAP();
void DrawUserPhoto(int x, int y, CDC *pDC);
//性别变量
int m_nSex;
SYSTEMTIME m_CurTime; //系统时间
CStudentAccessDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CStudentAccessDlg)
enum { IDD = IDD_STUDENTACCESS_DIALOG };
CComboBox m_comboSecret;
CComboBox m_comboLock;
CDateTimeCtrl m_dataTimedoc;
CButton m_btnParameter;
CButton m_btnRead;
CButton m_btnDelete;
CButton m_btnEdit;
CButton m_btnAdd;
CComboBox m_ComboBoxSex;
CListBox m_listAccess;
int m_nAge;
CString m_strName;
CString m_strMajor;
CString m_strHome;
CString m_strCollege;
int m_nLock;
int m_nSecret;
CString m_strFileMsg;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CStudentAccessDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CStudentAccessDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnReadAccess();
afx_msg void OnSelchangeListaccess();
afx_msg void OnDelete();
afx_msg void OnEdit();
afx_msg void OnAdd();
afx_msg void OnSelectFile();
afx_msg void OnEditParameter();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnHelp();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STUDENTACCESSDLG_H__69525B29_94C5_47E9_A45F_27E40DC06EF7__INCLUDED_)