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. problem with an edit control

problem with an edit control

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionannouncement
5 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.
  • D Offline
    D Offline
    Desmo16
    wrote on last edited by
    #1

    Hi all, I use the edit control EN_CHANGE event in order to update a slider in a software. The edit control contains a number. My problem is that every time i write a digit in the edit control this triggers the EN_CHANGE event, the slider is updated and the cursor in the edit control is put at the beginning. I wanna the update of the slider AFTER i enter the whole number in the edit control, not for every digit, but my boss want me to do that without using a button to load the value entered in the edit control into the slider. Is there another event i can use to obtain that ? Thanx in advance, Desmo16.

    M C S 3 Replies Last reply
    0
    • D Desmo16

      Hi all, I use the edit control EN_CHANGE event in order to update a slider in a software. The edit control contains a number. My problem is that every time i write a digit in the edit control this triggers the EN_CHANGE event, the slider is updated and the cursor in the edit control is put at the beginning. I wanna the update of the slider AFTER i enter the whole number in the edit control, not for every digit, but my boss want me to do that without using a button to load the value entered in the edit control into the slider. Is there another event i can use to obtain that ? Thanx in advance, Desmo16.

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      what is a whole number ? I know what it is, but what is the difference between 23 and 234 if both values are valid ? you could handle the kill focus event to only update the slider when the focus change, or handle the enter key and update the slider when the user hit the enter/return key.


      Maximilien Lincourt Your Head A Splode - Strong Bad

      D 1 Reply Last reply
      0
      • M Maximilien

        what is a whole number ? I know what it is, but what is the difference between 23 and 234 if both values are valid ? you could handle the kill focus event to only update the slider when the focus change, or handle the enter key and update the slider when the user hit the enter/return key.


        Maximilien Lincourt Your Head A Splode - Strong Bad

        D Offline
        D Offline
        Desmo16
        wrote on last edited by
        #3

        When i say "whole number" i mean "not a single digit", that is to say 345 or 765 and not 1 or 5 or 9. And no, not all values are valid 'cause they had a geophysical meaning in the software. Anyway, how can i trigger the event handling the enter key ? Thanx in advance, Desmo16.

        1 Reply Last reply
        0
        • D Desmo16

          Hi all, I use the edit control EN_CHANGE event in order to update a slider in a software. The edit control contains a number. My problem is that every time i write a digit in the edit control this triggers the EN_CHANGE event, the slider is updated and the cursor in the edit control is put at the beginning. I wanna the update of the slider AFTER i enter the whole number in the edit control, not for every digit, but my boss want me to do that without using a button to load the value entered in the edit control into the slider. Is there another event i can use to obtain that ? Thanx in advance, Desmo16.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Your use of 'whole number' makes no sense. I presume you mean a number that's been completely entered. There is no event that's fired only when the text is a certain length, you'd have to check that yourself in the EN_CHANGE event, and update the slider only when it's within the range you're hoping for.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          1 Reply Last reply
          0
          • D Desmo16

            Hi all, I use the edit control EN_CHANGE event in order to update a slider in a software. The edit control contains a number. My problem is that every time i write a digit in the edit control this triggers the EN_CHANGE event, the slider is updated and the cursor in the edit control is put at the beginning. I wanna the update of the slider AFTER i enter the whole number in the edit control, not for every digit, but my boss want me to do that without using a button to load the value entered in the edit control into the slider. Is there another event i can use to obtain that ? Thanx in advance, Desmo16.

            S Offline
            S Offline
            sheshidar
            wrote on last edited by
            #5

            Hi the same thing will happend when u use EN_CHANGE.Without using any button down then you can do in one way . but there u need to tell application to do something after a perticular size of data is entered. eex. data will update when u typed perticular number of characters in it.

            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