MFC中延时程序,程序如下,在if后添加延时语句,使若干时间后执行图片显示
voidCBabiaoDlg::OnButton1(){CButton*radio=(CButton*)GetDlgItem(IDC_RADIO1);CButton*ra...
void CBabiaoDlg::OnButton1()
{
CButton*radio=(CButton*)GetDlgItem(IDC_RADIO1);
CButton*radio1=(CButton*)GetDlgItem(IDC_RADIO2);
CButton*radio2=(CButton*)GetDlgItem(IDC_RADIO3);
if(radio->GetCheck()==BST_CHECKED)
GetDlgItem(IDC_10)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_10H)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_23H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_biaoti)->ShowWindow(SW_HIDE);
}
else if(radio1->GetCheck()==BST_CHECKED)
{
GetDlgItem(IDC_10)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_10H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3H)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_3)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_biaoti)->ShowWindow(SW_HIDE);
}
else if(radio2->GetCheck()==BST_CHECKED)
{
GetDlgItem(IDC_10)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_10H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23H)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_23)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_biaoti)->ShowWindow(SW_HIDE);
}
}
MFC中延时程序,程序如下,在if后添加延时语句,使若干时间后执行图片显示,IDC_***都是picture控件修改后的名称 展开
{
CButton*radio=(CButton*)GetDlgItem(IDC_RADIO1);
CButton*radio1=(CButton*)GetDlgItem(IDC_RADIO2);
CButton*radio2=(CButton*)GetDlgItem(IDC_RADIO3);
if(radio->GetCheck()==BST_CHECKED)
GetDlgItem(IDC_10)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_10H)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_23H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_biaoti)->ShowWindow(SW_HIDE);
}
else if(radio1->GetCheck()==BST_CHECKED)
{
GetDlgItem(IDC_10)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_10H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3H)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_3)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_biaoti)->ShowWindow(SW_HIDE);
}
else if(radio2->GetCheck()==BST_CHECKED)
{
GetDlgItem(IDC_10)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_10H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_23H)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_23)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3H)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_3)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_biaoti)->ShowWindow(SW_HIDE);
}
}
MFC中延时程序,程序如下,在if后添加延时语句,使若干时间后执行图片显示,IDC_***都是picture控件修改后的名称 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询