为什么VC ++资源编辑器没有将自动生成的代码放在正确的位置?

时间:2010-02-11 11:52:25

标签: visual-studio-2008 visual-c++ mfc

在MyControl.h中,我有:

class CMyControl: public CRichEditCtrl
{
    DECLARE_DYNAMIC( CMyControl)
public:
    CMyControl();
    virtual ~CMyControl();
public:

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CMyControl)
    //}}AFX_VIRTUAL

    // Generated message map functions
protected:
    //{{AFX_MSG(CMyControl)
    //}}AFX_MSG

    DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnEnKillfocus();
    afx_msg void OnEnChange();
    afx_msg void OnEnMsgfilter(NMHDR *pNMHDR, LRESULT *pResult);
};

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

每当我使用资源编辑器添加消息处理程序或事件覆盖方法或对话框控件成员变量时,它们总是在类的末尾添加。 {{AFX ...}}块的重点不在于保持这种组织吗?

0 个答案:

没有答案