在CPropertyPage中。对CEdit添加操作OnChangeEdit1(),
这里面首先判断是否为空,用以下方法获得“确定”按钮CWnd* pParentWnd = GetParent();
CButton* pButton=(CButton*)(pParentWnd->GetDlgItem(IDOK));设置可用pButton->EnableWindow(true);
不可用pButton->EnableWindow(false);
这里面首先判断是否为空,用以下方法获得“确定”按钮CWnd* pParentWnd = GetParent();
CButton* pButton=(CButton*)(pParentWnd->GetDlgItem(IDOK));设置可用pButton->EnableWindow(true);
不可用pButton->EnableWindow(false);
重载OnInitDialog(),在return之前对按钮初始化CButton* pButton=(CButton*)(this->GetDlgItem(IDOK));
pButton->EnableWindow(false); return bResult;
if(bEnableOK){
CButton* pButton=(CButton*)(this->GetDlgItem(IDOK));
pButton->EnableWindow(false);
}