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. restricting chars in edit box

restricting chars in edit box

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

    hi all, how to restrict the alphabets and numbers in edit box i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing need help :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

    B L M F 4 Replies Last reply
    0
    • C chethu665

      hi all, how to restrict the alphabets and numbers in edit box i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing need help :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

      B Offline
      B Offline
      bryce
      wrote on last edited by
      #2

      iirc (which i invariably do not) onchar message handler is something you might like to use Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
      Publitor, making Pubmed easy. http://www.sohocode.com/publitor

      Our kids books :The Snot Goblin, and Book 2 - the Snotgoblin and Fluff

      1 Reply Last reply
      0
      • C chethu665

        hi all, how to restrict the alphabets and numbers in edit box i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing need help :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

        L Offline
        L Offline
        Laxman Auti
        wrote on last edited by
        #3

        chethu665 wrote:

        how to restrict the alphabets and numbers in edit box i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing

        Check EN_CHANGE and EN_UPDATE Notification messages Knock out 't' from can't, You can if you think you can :cool:

        1 Reply Last reply
        0
        • C chethu665

          hi all, how to restrict the alphabets and numbers in edit box i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing need help :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

          M Offline
          M Offline
          Mahesh Kulkarni
          wrote on last edited by
          #4

          Hi, To solve ur problem Following Article will help you. Just go through it. http://www.codeproject.com/editctrl/NumEditCtl.asp The secret of life is not enjoyment but education through experience. - Swami Vivekananda.

          1 Reply Last reply
          0
          • C chethu665

            hi all, how to restrict the alphabets and numbers in edit box i cant use the PreTranslateMessage since i need to enable a listbox when i press the key .it will block it .how can it be done .can it be done by subclassing need help :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

            F Offline
            F Offline
            FarPointer
            wrote on last edited by
            #5

            Derive it from (subclass)CMyEdit and override the WM_CHAR. Regards, FarPointer Blog:http://farpointer.blogspot.com/

            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