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. How to use SetFormat function of class CDateTimeCtrl properly

How to use SetFormat function of class CDateTimeCtrl properly

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
3 Posts 3 Posters 5 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.
  • V Offline
    V Offline
    varun01
    wrote on last edited by
    #1

    Hi to all, i am using date Timer picker control in my application at the run time it is displaying current system time But i want to display my own time , suppose system time is 05:08:07, but i want to display always 10:12:34 that i am doing by using SetFormat function, this function will set this string, at run time it is displaying 10:12:34, but the problem is this time is static , i want to modify this time by using up & down arrow ,, but i can`t ,, arrow keys & up down click buttons are not working how can i enable arrow keys for changing the time ?

    varun

    _ D 2 Replies Last reply
    0
    • V varun01

      Hi to all, i am using date Timer picker control in my application at the run time it is displaying current system time But i want to display my own time , suppose system time is 05:08:07, but i want to display always 10:12:34 that i am doing by using SetFormat function, this function will set this string, at run time it is displaying 10:12:34, but the problem is this time is static , i want to modify this time by using up & down arrow ,, but i can`t ,, arrow keys & up down click buttons are not working how can i enable arrow keys for changing the time ?

      varun

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

      Here[^] is a very good control that allows you to edit date and time. However you may need to handle the UP/DOWN arrow keys to increment/decrement the date or the time.

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

      1 Reply Last reply
      0
      • V varun01

        Hi to all, i am using date Timer picker control in my application at the run time it is displaying current system time But i want to display my own time , suppose system time is 05:08:07, but i want to display always 10:12:34 that i am doing by using SetFormat function, this function will set this string, at run time it is displaying 10:12:34, but the problem is this time is static , i want to modify this time by using up & down arrow ,, but i can`t ,, arrow keys & up down click buttons are not working how can i enable arrow keys for changing the time ?

        varun

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        varun01 wrote:

        i want to modify this time by using up & down arrow ,,

        On the keyboard? As long as the control has focus, and assuming you've done nothing to change the default behavior, the navigational keys should work.

        "Love people and use things, not love things and use people." - Unknown

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        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