将你的按钮增加一个控件型的变量如:ctrlButtonOk
ctrlButtonOk->EnableWindow(FALSE);//该按钮无效
ctrlButtonOk->EnableWindow(TRUE);//该按钮有效