Alright i need the timer to check my 2 files every ten seconds, and update the dialog box accordingly. The timer is to then shut off when all of the data is out of the data.txt file. I have attached the Dlg.cpp file. Can any one give me suggestions as to why my timer is not working..(Using MFC) If you need more code let me know.. Any suggestions will help!!
void CBldPressureDlg::OnTimer(UINT nIDEvent)
{
if(nIDEvent == SECONDS_TIMER)
{
CDialog::OnTimer(nIDEvent);
CString input;
CStdioFile dat;
dat.ReadString(input);
if(input.IsEmpty())
{
KillTimer(SECONDS_TIMER);
}
int find = input.Find("/"
;
m_systolicedit = input.Left(find);
m_diastolicedit = input.Mid(find +1);
}
return;
}
void CBldPressureDlg::OnTimer(UINT nIDEvent)
{
if(nIDEvent == SECONDS_TIMER)
{
CDialog::OnTimer(nIDEvent);
CString input;
CStdioFile dat;
dat.ReadString(input);
if(input.IsEmpty())
{
KillTimer(SECONDS_TIMER);
}
int find = input.Find("/"
m_systolicedit = input.Left(find);
m_diastolicedit = input.Mid(find +1);
}
return;
}