按钮的Owner Draw属性设为True
class CEditButton : public CButton
{
public:
DECLARE_MESSAGE_MAP()
afx_msg void OnNcPaint();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/); //手动添加
}