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. Non-Wizard CEdit Control

Non-Wizard CEdit Control

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structuresquestion
4 Posts 2 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.
  • J Offline
    J Offline
    JennyP
    wrote on last edited by
    #1

    Hello, I have created (in code, not the wizard) an array of CEdit boxes. I would like to be notified when the user has clicked in one of these boxes (and which box they clicked in). How would I get MFC to send me a message? thanks! JennyP

    E 1 Reply Last reply
    0
    • J JennyP

      Hello, I have created (in code, not the wizard) an array of CEdit boxes. I would like to be notified when the user has clicked in one of these boxes (and which box they clicked in). How would I get MFC to send me a message? thanks! JennyP

      E Offline
      E Offline
      Ernest Laurentin
      wrote on last edited by
      #2

      IDC_EDIT1 - IDC_EDITn are in range

      ON_CONTROL_RANGE(BN_CLICKED, IDC_EDIT1, IDC_EDITn, OnEditRangeClick )
      afx_msg void OnEditRangeClick(UINT uID)

      ÿVOTD:19 "My dear brothers, take note of this: Everyone should be quick to listen, slow to speak and slow to become angry, 20for man's anger does not bring about the righteous life that God desires." - Jam 1:19

      J 1 Reply Last reply
      0
      • E Ernest Laurentin

        IDC_EDIT1 - IDC_EDITn are in range

        ON_CONTROL_RANGE(BN_CLICKED, IDC_EDIT1, IDC_EDITn, OnEditRangeClick )
        afx_msg void OnEditRangeClick(UINT uID)

        ÿVOTD:19 "My dear brothers, take note of this: Everyone should be quick to listen, slow to speak and slow to become angry, 20for man's anger does not bring about the righteous life that God desires." - Jam 1:19

        J Offline
        J Offline
        JennyP
        wrote on last edited by
        #3

        Thanks for the reply... So in my code, the "IDC_EDIT1" would be the 2200 (the control's nID)? m_CEAvailable[i].Create(EditStyle | WS_TABSTOP, CERect, this, 2200+i); JennyP

        E 1 Reply Last reply
        0
        • J JennyP

          Thanks for the reply... So in my code, the "IDC_EDIT1" would be the 2200 (the control's nID)? m_CEAvailable[i].Create(EditStyle | WS_TABSTOP, CERect, this, 2200+i); JennyP

          E Offline
          E Offline
          Ernest Laurentin
          wrote on last edited by
          #4

          Yes! but I would advise you to define IDC_EDIT1 (or whatever the name you like) and use it instead, cleaner! I am in YYY:-D

          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