#if !defined(AFX_AVIBUTTON_H__06C64CD2_D7FC_4A20_B09E_83EFA094B01A__INCLUDED_)
#define AFX_AVIBUTTON_H__06C64CD2_D7FC_4A20_B09E_83EFA094B01A__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Avibutton.h : header file
///////////////////////////////////////////////////////////////////////////////
// CAvibutton windowclass CAvibutton : public CButton
{
// Construction
public:
CAvibutton();
//在这里写方法(1)
// Attributes
public:
//在这里写方法(2)
// Operations
public:
//在这里写方法(3)
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAvibutton)
//}}AFX_VIRTUAL// Implementation
public:
virtual ~CAvibutton(); // Generated message map functions
protected:
//{{AFX_MSG(CAvibutton)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG DECLARE_MESSAGE_MAP()
};///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_AVIBUTTON_H__06C64CD2_D7FC_4A20_B09E_83EFA094B01A__INCLUDED_)
代码是我用MFC新建一个类的头文件,我想了解的就是上面三个地方的访问权限,Public的三个地方声明的函数或方法,即上面的(1,2,3)三个地方是不是效果都是一样的,还是有分别的.
#define AFX_AVIBUTTON_H__06C64CD2_D7FC_4A20_B09E_83EFA094B01A__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Avibutton.h : header file
///////////////////////////////////////////////////////////////////////////////
// CAvibutton windowclass CAvibutton : public CButton
{
// Construction
public:
CAvibutton();
//在这里写方法(1)
// Attributes
public:
//在这里写方法(2)
// Operations
public:
//在这里写方法(3)
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAvibutton)
//}}AFX_VIRTUAL// Implementation
public:
virtual ~CAvibutton(); // Generated message map functions
protected:
//{{AFX_MSG(CAvibutton)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG DECLARE_MESSAGE_MAP()
};///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_AVIBUTTON_H__06C64CD2_D7FC_4A20_B09E_83EFA094B01A__INCLUDED_)
代码是我用MFC新建一个类的头文件,我想了解的就是上面三个地方的访问权限,Public的三个地方声明的函数或方法,即上面的(1,2,3)三个地方是不是效果都是一样的,还是有分别的.
public:
CAvibutton();
//在这里写构造函数
// Attributes
public:
//在这里属性
// Operations
public:
//在这里写方法清晰明确,利于阅读和代码的维护