class CMyDlg: public CParentDlg
{
// member functions
public:
CButton m_btnDemo;
};
然后重载 DoDateExchange(CDataExchange* pDX) , 在重载的函数里面先调用
CParentDlg::DoDateExchange(CDataExchange* pDX)
然后添加 DDX_Control(pDX, IDC_BTN_DEMO, m_btnDemo); 其中IDC_BTN_DEMO 是你添加按钮资源的ID