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. Edit Control

Edit Control

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
9 Posts 4 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.
  • A Offline
    A Offline
    AbhiHcl
    wrote on last edited by
    #1

    Hi Have created a Editbox derived from CEdit and a spin control. The editbox is attached with Spin control. There should be time value in Edit box and the value (hr ,min ,AM/PM) should increase or decrease according to up and Down arrow of the spin control. Can anyone plese help me how to increse or deecrease the particular selection using spin control. any help is appriciated.. Thanks..

    N U 2 Replies Last reply
    0
    • A AbhiHcl

      Hi Have created a Editbox derived from CEdit and a spin control. The editbox is attached with Spin control. There should be time value in Edit box and the value (hr ,min ,AM/PM) should increase or decrease according to up and Down arrow of the spin control. Can anyone plese help me how to increse or deecrease the particular selection using spin control. any help is appriciated.. Thanks..

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      Why dont you use the DateTimeControl instead of edit box?

      nave [My Articles] [My Blog]

      A 1 Reply Last reply
      0
      • N Naveen

        Why dont you use the DateTimeControl instead of edit box?

        nave [My Articles] [My Blog]

        A Offline
        A Offline
        AbhiHcl
        wrote on last edited by
        #3

        I need to customiza the control. There will be some image on up and down arrow of the spin control and also some gradient effect shud be there in edit box. Is these thigs are possibe in datetimeControl ? if ys then please guide me hw to do ? Thanks..

        N 1 Reply Last reply
        0
        • A AbhiHcl

          I need to customiza the control. There will be some image on up and down arrow of the spin control and also some gradient effect shud be there in edit box. Is these thigs are possibe in datetimeControl ? if ys then please guide me hw to do ? Thanks..

          N Offline
          N Offline
          Naveen
          wrote on last edited by
          #4

          AbhiHcl wrote:

          There will be some image on up and down arrow of the spin control

          If you have customised a normal spin control, you can customise, the spin in the Date time picker also. The spin control is actually a child of the Date time picker and you can get the handle of that spin control like HWND hSpin = GetWindow( hDateTimerPicker, GW_CHILD ); . Then you can subclass it.

          AbhiHcl wrote:

          and also some gradient effect shud be there in edit box.

          How did you plan to do that? Try the same will work in Date time picker also..

          nave [My Articles] [My Blog]

          A 1 Reply Last reply
          0
          • A AbhiHcl

            Hi Have created a Editbox derived from CEdit and a spin control. The editbox is attached with Spin control. There should be time value in Edit box and the value (hr ,min ,AM/PM) should increase or decrease according to up and Down arrow of the spin control. Can anyone plese help me how to increse or deecrease the particular selection using spin control. any help is appriciated.. Thanks..

            U Offline
            U Offline
            User 3919723
            wrote on last edited by
            #5

            To get the text portion currently selected? See CEdit::GetSel.

            A 1 Reply Last reply
            0
            • N Naveen

              AbhiHcl wrote:

              There will be some image on up and down arrow of the spin control

              If you have customised a normal spin control, you can customise, the spin in the Date time picker also. The spin control is actually a child of the Date time picker and you can get the handle of that spin control like HWND hSpin = GetWindow( hDateTimerPicker, GW_CHILD ); . Then you can subclass it.

              AbhiHcl wrote:

              and also some gradient effect shud be there in edit box.

              How did you plan to do that? Try the same will work in Date time picker also..

              nave [My Articles] [My Blog]

              A Offline
              A Offline
              AbhiHcl
              wrote on last edited by
              #6

              GetWindow() takes only one parameter as HWnd. I m not clear how to proceed.. Can u plz send me some sample code..plzzz...

              N 1 Reply Last reply
              0
              • U User 3919723

                To get the text portion currently selected? See CEdit::GetSel.

                A Offline
                A Offline
                AbhiHcl
                wrote on last edited by
                #7

                CEdit::GetSel() return DWORD. and I am not sure how to convert the value as string and then iin int. bcoz I need to increment and decrement that value, what ever is selected. Could u plz help me out for this logic.

                L 1 Reply Last reply
                0
                • A AbhiHcl

                  GetWindow() takes only one parameter as HWnd. I m not clear how to proceed.. Can u plz send me some sample code..plzzz...

                  N Offline
                  N Offline
                  Naveen
                  wrote on last edited by
                  #8

                  AbhiHcl wrote:

                  GetWindow() takes only one parameter as HWnd. I m not clear how to proceed..

                  try putting :: infront of it ;) . ::GetWindow(...) Sorry I dont have a sample for that now...

                  nave [My Articles] [My Blog]

                  1 Reply Last reply
                  0
                  • A AbhiHcl

                    CEdit::GetSel() return DWORD. and I am not sure how to convert the value as string and then iin int. bcoz I need to increment and decrement that value, what ever is selected. Could u plz help me out for this logic.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    You should make greater use of the MSDN documentation. This page[^] explains the values in the DWORD and how they may be used to get the specific characters of your edit string.

                    It's time for a new signature.

                    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