📄 managerview.h
字号:
// managerView.h : interface of the CManagerView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MANAGERVIEW_H__2CBBF36D_59A4_11D3_860E_C141D5317B49__INCLUDED_)
#define AFX_MANAGERVIEW_H__2CBBF36D_59A4_11D3_860E_C141D5317B49__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MyListCtrl.h"
#include "AddrSet.h"
#include "MoneySet.h"
class CManagerView : public CFormView
{
protected: // create from serialization only
CManagerView();//构造函数
DECLARE_DYNCREATE(CManagerView)
public:
//{{AFX_DATA(CManagerView)
enum { IDD = IDD_MANAGER_FORM };
CMyListCtrl m_list;//与列表框控件相连的控制变量
//}}AFX_DATA
// Attributes
public:
CManagerDoc* GetDocument();
// Operations
public:
CDaoDatabase *m_pDatabase;//数据库指针
CDaoTableDef *m_pTableDef;//数据库表定义指针
CDaoFieldInfo m_FieldInfo;//数据库表字段信息
CString m_strTableName;//数据库表名
CString m_strDatabaseName;//数据库名
int m_nFieldIndex;//数据库表的字段数目亦即列表框的列数
CAddrSet m_addrSet;//“通讯录”的记录集
CMoneySet m_moneySet;//“帐簿”记录集
BOOL m_bIsOpen;//是否有数据库打开
BOOL m_bIsNewDatabase;//是否打开了新数据库
BOOL m_bIsAddress;//是否打开了通讯录
BOOL m_bIsMoney;//是否打开了帐簿
void LoadDatabaseData();//在列表框中将数据库表数据显示出来
BOOL OpenDatabase();//打开数据库
void ModifyAddress();//更改“通讯录”记录
void ModifyMoney();//更改“帐簿”记录
void AddAddress();//添加“通讯录”记录
void AddMoney();//添加“帐簿”记录
void DelAddress();//删除“通讯录”记录
void DelMoney();//删除“帐簿”记录
void Sort(CString& str);//排序数据库表
CString VariantToStr(const COleVariant& var);//将OLE变量转换为C++变量
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CManagerView)
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 afx_msg void OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CManagerView();//构析函数
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CManagerView)
afx_msg void OnDblclkAddressList(NMHDR* pNMHDR, LRESULT* pResult);//处理在列表框中鼠标的双击
afx_msg void OnAdd();//处理工具栏的添加按钮命令
afx_msg void OnModify();//处理工具栏的修改按钮命令
afx_msg void OnDel();//处理工具栏的删除按钮命令
afx_msg void OnColumnclickAddressList(NMHDR* pNMHDR, LRESULT* pResult);//处理单击列表框列头
afx_msg void OnUpdateAdd(CCmdUI* pCmdUI);//处理工具栏添加按钮状态的更新
afx_msg void OnUpdateDel(CCmdUI* pCmdUI);//处理工具栏删除按钮状态的更新
afx_msg void OnUpdateModify(CCmdUI* pCmdUI);//处理工具栏修改按钮状态的更新
afx_msg void OnFileClose();//处理数据库关闭命令
afx_msg void OnFileOpen();//处理数据库打开命令
afx_msg void OnUpdate();//处理工具栏的更新显示命令
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);//处理鼠标右击时弹出快捷菜单
afx_msg void OnUpdateUpdate(CCmdUI* pCmdUI);//处理工具栏更新显示按钮状态的更新
afx_msg void OnAddress();//处理工具栏通讯录按钮命令
afx_msg void OnUpdateAddress(CCmdUI* pCmdUI);//处理工具栏中通讯录按钮状态的更新
afx_msg void OnMoney();//处理工具栏帐簿按钮命令
afx_msg void OnUpdateMoney(CCmdUI* pCmdUI);//处理工具栏中帐簿按钮状态的更新
afx_msg void OnNewAddress();
afx_msg void OnNewDatabase();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in managerView.cpp
inline CManagerDoc* CManagerView::GetDocument()
{ return (CManagerDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MANAGERVIEW_H__2CBBF36D_59A4_11D3_860E_C141D5317B49__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -