Create a CString object and use the "Format" function to write your time values to the string. Something like:

CString TimeVals;
TimeVals.Format("%02d:%02d:%02d", hr, min, sec);

You can then use SetDlgItemText to update your edit control.

setDlgItemText(IDC_TIMEVALS, (LPCTSTR)TimeVals);

Hope this helps.