Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Updating system time in MFC

Updating system time in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nisha00000
    wrote on last edited by
    #1

    How to get the system time in MFC? Give me some samples r urls Regards Nisha.S:rose:

    _ J L H 4 Replies Last reply
    0
    • N nisha00000

      How to get the system time in MFC? Give me some samples r urls Regards Nisha.S:rose:

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      nisha00000 wrote:

      How to get the systemtime in MFC?

      The solution resides in your query itself. See GetSystemTime().

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      • N nisha00000

        How to get the system time in MFC? Give me some samples r urls Regards Nisha.S:rose:

        J Offline
        J Offline
        Jijo Raj
        wrote on last edited by
        #3

        Have a look at COleDateTime too. Regards, Jijo.

        1 Reply Last reply
        0
        • N nisha00000

          How to get the system time in MFC? Give me some samples r urls Regards Nisha.S:rose:

          L Offline
          L Offline
          Le rner
          wrote on last edited by
          #4

          hi use this it helps u. // get as a CTime CTime timeTime; DWORD dwResult =m_retirmentdate.GetTime(timeTime); // pCtrl->GetTime(timeTime); if (dwResult == GDT_VALID) { // the user checked the box and specified data CString str; // is it a time-only control, or a date-only control? if ((m_retirmentdate.GetStyle() & DTS_TIMEFORMAT) == DTS_TIMEFORMAT) str = timeTime.Format(_T("%X")); else str = timeTime.Format(_T("%x")); AfxMessageBox(str); } else { // the user unmarked the "none" box AfxMessageBox(_T("Time not set!")); }

          1 Reply Last reply
          0
          • N nisha00000

            How to get the system time in MFC? Give me some samples r urls Regards Nisha.S:rose:

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            And see World Time[^].

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups