How does VC++ display numbers in the edit box? . . Kneel down. . . .
Cannot display because the types do not match. Is your Mytime from CTime? It must be formatted after the system time comes out. You can define a CString, then format the time as CString with the format method of CTime, and then set it with SetdlgitemText. Or directly associate the CString variable with EDIT, and update the date (false) after assignment. If you must use numbers, you must convert the time to the same type as the time displayed in the edit box. If your Mytime is derived from the structure of SYSTEMTIME, the value you get will be WORD, not int. Check whether the types match. In addition, remember to paste all the codes next time you ask questions. People don't know how much time you have.