void CEx_ResearchDlg::OnOK()
{
CString str,strCtrl;
str="你的年龄";
UINT nID=GetChecKedRadioButton(IDC_RADIO1,IDC_RADIO4);
GetDlgItemText(nID,strCtrl);
str=str+strCtrl;
str=str+"\n你使用的接入方式:";
nID=GetChecKedRadioButton(IDC_RADIO5,IDC_RADIO8);
GetDlgItemText(nID,strCtrl);
str=str+strCtrl;
str=str+"\n你上网的主要是:\n";
UINT nCheckIDs[4]={IDC_RADIO9,IDC_RADIO10,IDC_RADIO11,IDC_RADIO12};
CButton*pBtn;
for(int i=0;i<4;i++)
{
pBtn=(CButton*)GetDlgItem(nCheckIDs[i]);
if(pBtn->GetCheck())
{
pBtn->GetWindowText(strCtrl);
str=str+strCtrl;
str=str+" ";
}
}
MessageBox(str);
CDialog::OnOK();
}
GetChecKedRadioButton这个函数没有定义
、
GetCheckedRadioButton函数未定义
GetCheckedRadioButton应该是CWnd的成员函数,他不是dialog类的成员函数
应该是没有包含 GetChecKedRadioButton 所在的头文件
GetCheckedRadioButton是mfc下Cwnd成员函数。如果你要用win32编码的话用 IsDlgButtonChecked 试试吧。
包含头文件加一个conio.h
#include <conio.h>
或者把getch
这个函数改成 getchar函数。
你引用了哪些库?
GetChecKedRadioButton没被引用?未声明?