There is a status bar in the control of the VC to add a date and time in the Form Status bar. In fact, through simple code, you can create a status bar with clock and set up the time-shaped display. Examples are as follows: First, use the MFC AppWizard to create a single document interface by default. Then, write code: 1) Add new string in String Table, which is defined as id_indicator_clock, set it to 00:00:00 (due to the default width of the status bar according to CAPTION, using this value) For time display reserved space or written into 8 spaces, it is important to take the space enough.). 2) Add the declaration for Indicators MainFrm.cpp ID_INDICATOR_CLOCK, code is as follows: ... static UINT indicators [] = {ID_SEPARATOR, ID_INDICATOR_CLOCK, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL,}; ... ID_INDICATOR_CLOCK this step will affect the time position of the insertion pane The display location in the status bar. 3) Install the timer: Add code at the oncreate function in the mainfrm.cpp as follows: int CMAINFRAME :: OnCreate (LPCReatestruct lpCreatestruct) {... setTimer_clock, 1000, null; // Install the timer, and time interval Set to 1000 milliseconds Return 0;} 4) Write time handler: Use classwizard to add WM_TIMER's message to the CMAINFRAME class ONTIMER, and add code as follows: void cmainframe :: Ontimer (uint nidevent) {// Todo: add your Message handler code ctime time; time = ctime :: getcurrenttime (); // get the current system time cstring str_time; str_time = time.format ("% h:% m:% s"); / / convert the time to the string format m_wndStatusBar.SetPaneText (m_wndStatusBar.CommandToIndex (ID_INDICATOR_CLOCK), str_Time); // update the tatusbar CFrameWnd :: OnTimer (nIDEvent);} 5) destruction timer: CMainFrame class using ClassWizard added to the WM_CLOSE Message handler onclose, and add code as follows: