能够一直按F 间隔为0.2秒 if(state) { SetTimer(1,200,NULL); GetDlgItem(IDC_BUTTON1)->SetWindowText("关"); state=0; } else { KillTimer(1); state=1; GetDlgItem(IDC_BUTTON1)->SetWindowText("开"); }