少构造函数class cmyedit : public CEdit
{
// Construction
public:
cmyedit();// Attributes
public:// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(cmyedit)
//}}AFX_VIRTUAL// Implementation
public:
virtual ~cmyedit(); // Generated message map functions
protected:
//{{AFX_MSG(cmyedit)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG DECLARE_MESSAGE_MAP()
};

解决方案 »

  1.   

    还是不能实例化
    这是代码:
    // DialogDlg.h : 头文件
    //#pragma once#define IDI_BN_DISPLAY 3// CDialogDlg 对话框
    class CDialogDlg : public CDialog
    {
    // 构造
    public:
    CDialogDlg(CWnd* pParent = NULL); // 标准构造函数// 对话框数据
    enum { IDD = IDD_DIALOG_DIALOG }; protected:
    virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持private:
    CButton btn;
    cmyedit myedit;
    // 实现
    protected:
    HICON m_hIcon; // 生成的消息映射函数
    virtual BOOL OnInitDialog();
    afx_msg void OnPaint();
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg HCURSOR OnQueryDragIcon();
    afx_msg void ShowInfo();
    DECLARE_MESSAGE_MAP()
    };class cmyedit : public CEdit 

    // Construction 
    public: 
    cmyedit(); // Attributes 
    public: // Operations 
    public: // Overrides 
    // ClassWizard generated virtual function overrides 
    //{{AFX_VIRTUAL(cmyedit) 
    //}}AFX_VIRTUAL // Implementation 
    public: 
    virtual ~cmyedit(); // Generated message map functions 
    protected: 
    //{{AFX_MSG(cmyedit) 
    // NOTE - the ClassWizard will add and remove member functions here. 
    //}}AFX_MSG DECLARE_MESSAGE_MAP() 
    };