处理“显卡类型”按钮的单击事件,设置显卡类型,并将设置结果保存到INI文件中。代码如下:
void CCaptureDlg::OnSetting()
{
CButton* pVGAButton = (CButton*)GetDlgItem(IDC_VGA);
int sel = pVGAButton->GetCheck(); //获得VGA单选按钮的状态
if(sel)
{
WritePrivateProfileString("显卡设置","类型","VGA","./syssetting.ini"); //将数据写入INI文件
}
else
{
WritePrivateProfileString("显卡设置","类型","PCI","./syssetting.ini"); //将数据写入INI文件
}
MessageBox("要使显卡设置生效,需要重新启动应用程序!","提示");
}