Shahzad
April 11th, 1999, 01:43 AM
I have dialog box with several edit controls, one of which displays time after each second. The problem is that when it displays time, each second the other edit boxes value is also repainted because I have used UpdateData(false) statement in OnTimer fuction. So when I write in these edit boxes, it display old values each second, and I cann't write in them. Here is my code in OnTimer() function.
void CCMSTesterDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
int hr,min,sec;
m_Time=COleDateTime::GetCurrentTime();
hr =m_Time.GetHour();
min = m_Time.GetMinute();
sec = m_Time.GetSecond();
m_Time.SetTime(hr,min,sec);
UpdateData(false); // this statement updates other controls as well, and
// i write in them, each second they display the old
// values again. so I can't write in them!
CDialog::OnTimer(nIDEvent);
}
Please let know how can I display the continous time, without updating other Edit controls.
void CCMSTesterDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
int hr,min,sec;
m_Time=COleDateTime::GetCurrentTime();
hr =m_Time.GetHour();
min = m_Time.GetMinute();
sec = m_Time.GetSecond();
m_Time.SetTime(hr,min,sec);
UpdateData(false); // this statement updates other controls as well, and
// i write in them, each second they display the old
// values again. so I can't write in them!
CDialog::OnTimer(nIDEvent);
}
Please let know how can I display the continous time, without updating other Edit controls.