The trick is to set the FormatString of the num edit control to a format that displays dates/times and to use the COleDateTime class to handle converting the date/time to a double. COleDateTime encapsulates time stored as a DATE, which is a typedef for double. COleDateTime uses the same conversion factor for date/time as what the num edit expects, and since it supports a conversion operator to a DATE, which is really a double, and the num edit Value property is a double, displaying the current time in a num edit can be as simple as this:
// Assuming you have a member variable called m_numEdit for a CNiNumEdit
m_numEdit.FormatString = _T("hh:nn:ss");
m_numEdit.Value = COleDateTime::GetCurrentTime();
Hope this helps.
- Elton