我对ClassWizard有一个疑问,为什么我用它添加虚函数重载时出错呢?
下面是我用Xtreme ToolKit派生的类,
#ifndef __TABDOORCTRL_H
#define __TABDOORCTRL_H
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////////
// CTabDoorCtrl class
class CTabDoorCtrl : public CXTTreeCtrl
{
protected:
DECLARE_DYNCREATE(CTabDoorCtrl)
// Construction / destruction
public:
// Constructs a CTabDoorCtrl object.
CTabDoorCtrl();
// Destroys a CTabDoorCtrl object, handles cleanup and de-allocation.
virtual ~CTabDoorCtrl();
// Member variables
protected:
// Member functions
public:
CImageList m_imageList;
CBitmap m_bitmap;
//{{AFX_VIRTUAL(CTabDoorCtrl)
public:
//}}AFX_VIRTUAL
//{{AFX_MSG(CTabDoorCtrl)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // __TABDOORCTRL_H
我用类向导想添加一个Create函数,可是得到的确是
BOOL CTabDoorCtrl::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
基类是CWnd而不是CXTTreeCtrl,所以程序编译出错
不知大家遇到过这样的问题吗?请赐教!