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

📄 addressbookview.h

📁 采用MFC DAO对象和接口编程技术实现一个地址簿数据库的管理器。
💻 H
字号:
// AddressBookView.h : interface of the CAddressBookView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_ADDRESSBOOKVIEW_H__E9524201_373A_11D4_81CA_0040052E8825__INCLUDED_)
#define AFX_ADDRESSBOOKVIEW_H__E9524201_373A_11D4_81CA_0040052E8825__INCLUDED_

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


class CAddressBookView : public CListView
{
protected: // create from serialization only
	CAddressBookView();
	DECLARE_DYNCREATE(CAddressBookView)

protected:
	enum {NUM_COLUMNS = 7};
	int			m_cx;
	BOOL		m_nEdit;
	int         nSortedCol; 
	BOOL        bSortAscending;
	BOOL		m_DisplayColumn [NUM_COLUMNS];
	

protected:
	enum
	{
		COL_NAME  	= 0,
		COL_WPHONE	= 1,
		COL_MPHONE  = 2,
		COL_HPHONE  = 3,
		COL_NOTE    = 4,
	};

	static UINT	m_ColumnLabelID [NUM_COLUMNS];	// list view control header IDs, loaded from resource
	static int	m_ColumnFormat  [NUM_COLUMNS];	// list view column format
	int			m_ColumnWidth   [NUM_COLUMNS];

	CImageList* m_pImageList;
// Attributes
public:
	CAddressBookDoc* GetDocument();

// Operations
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAddressBookView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CAddressBookView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CAddressBookView)
	afx_msg void OnOpenDabse();
	afx_msg void OnUpdateOpenDabse(CCmdUI* pCmdUI);
	afx_msg void OnDelete();
	afx_msg void OnNewrecord();
	afx_msg void OnRefrash();
	afx_msg void OnUpdateRefrash(CCmdUI* pCmdUI);
	afx_msg void OnUpdateDelete(CCmdUI* pCmdUI);
	afx_msg void OnUpdataDb();
	afx_msg void OnUpdateUpdataDb(CCmdUI* pCmdUI);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnPopNewrecord();
	afx_msg void OnPopUpdate();
	afx_msg void OnPopDelete();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in AddressBookView.cpp
inline CAddressBookDoc* CAddressBookView::GetDocument()
   { return (CAddressBookDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_ADDRESSBOOKVIEW_H__E9524201_373A_11D4_81CA_0040052E8825__INCLUDED_)

⌨️ 快捷键说明

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