开发者

Why is VC++ Resource Editor not putting auto-generated code in the right place?

In MyControl.h I have:

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:
开发者_JAVA百科    //{{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.

Whenever I use the resource editor to add a message handler or event override method or a dialog control member variable, they always get added at the end of the class. Isn't the whole point of the {{AFX...}} blocks to keep this organised?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜