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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Edit Boxes

Edit Boxes

Scheduled Pinned Locked Moved C / C++ / MFC
data-structurestutorial
6 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.
  • S Offline
    S Offline
    sankar
    wrote on last edited by
    #1

    Dear All I have this basic doubt - if I have a number of textboxes with in a static Group, is it possible for me to cerate an array to refer to them instead of creating memebr variables for each & every box. example : assuem there are 3 text boxes , tehn can i jsut say m_Textboxes[3] isntead of saying m_textboxes1, m_textboxes2, m_textboxes3. Pl. suggest Thanks regards Sankar

    M RaviBeeR R 3 Replies Last reply
    0
    • S sankar

      Dear All I have this basic doubt - if I have a number of textboxes with in a static Group, is it possible for me to cerate an array to refer to them instead of creating memebr variables for each & every box. example : assuem there are 3 text boxes , tehn can i jsut say m_Textboxes[3] isntead of saying m_textboxes1, m_textboxes2, m_textboxes3. Pl. suggest Thanks regards Sankar

      M Offline
      M Offline
      Mike Nordell
      wrote on last edited by
      #2

      Tah urgah &foo mutt bar 47 -> 42 enth mpi jag not gilla [7% Fatta?! I think I have to spell it out. If you can't get a question understandable (and I do appreciate language barriers as I'm no English speaker myself) you will get no response. Did you use a machine translation engine that tried to engage in some eastern to english translation? Please check your question for spelling mistakes like "then" becomes "tehn", to begin with. Sorry for being a complete bastard, but without even displaying this amount of interest in your question (to spell these word correctly, which I don't dubt you can do), how much interest do you think people possibly answering it would pay to your question? /Mike

      S 1 Reply Last reply
      0
      • M Mike Nordell

        Tah urgah &foo mutt bar 47 -> 42 enth mpi jag not gilla [7% Fatta?! I think I have to spell it out. If you can't get a question understandable (and I do appreciate language barriers as I'm no English speaker myself) you will get no response. Did you use a machine translation engine that tried to engage in some eastern to english translation? Please check your question for spelling mistakes like "then" becomes "tehn", to begin with. Sorry for being a complete bastard, but without even displaying this amount of interest in your question (to spell these word correctly, which I don't dubt you can do), how much interest do you think people possibly answering it would pay to your question? /Mike

        S Offline
        S Offline
        sankar
        wrote on last edited by
        #3

        Thanks for ur suggestion.

        M 1 Reply Last reply
        0
        • S sankar

          Thanks for ur suggestion.

          M Offline
          M Offline
          Mike Nordell
          wrote on last edited by
          #4

          Thanks for ur suggestion. I think "ur" was to be "your". :-) But to get back to your problem: Yes, you can put edit controls as a group inside "something", so long as you yourself make that "something" a collections class, providing your own operator[] and such. ++luck;

          1 Reply Last reply
          0
          • S sankar

            Dear All I have this basic doubt - if I have a number of textboxes with in a static Group, is it possible for me to cerate an array to refer to them instead of creating memebr variables for each & every box. example : assuem there are 3 text boxes , tehn can i jsut say m_Textboxes[3] isntead of saying m_textboxes1, m_textboxes2, m_textboxes3. Pl. suggest Thanks regards Sankar

            RaviBeeR Offline
            RaviBeeR Offline
            RaviBee
            wrote on last edited by
            #5

            If you want to refer to them as a collection in order to easily enable/disable them, check out this article. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

            1 Reply Last reply
            0
            • S sankar

              Dear All I have this basic doubt - if I have a number of textboxes with in a static Group, is it possible for me to cerate an array to refer to them instead of creating memebr variables for each & every box. example : assuem there are 3 text boxes , tehn can i jsut say m_Textboxes[3] isntead of saying m_textboxes1, m_textboxes2, m_textboxes3. Pl. suggest Thanks regards Sankar

              R Offline
              R Offline
              Roger Allen
              wrote on last edited by
              #6

              Yes, you can do this. If you are using the MFC DDX_.. method, you need to declare your member variables etc outside of the AFX_DATA comment flags in the .h fiel of your dialog/class. You also need to put the DDX_Control etc calls outside the the AFX_DATA_MAP entries in the DoDataExchange function:

              //{{AFX\_DATA\_MAP(CSGAControlView)
              DDX\_Control(pDX, IDC\_TRAYNAME4, m\_TrayName4);
              DDX\_Control(pDX, IDC\_TRAYNAME3, m\_TrayName3);
              DDX\_Control(pDX, IDC\_TRAYNAME2, m\_TrayName2);
              DDX\_Control(pDX, IDC\_TRAYNAME1, m\_TrayName1);
              DDX\_Control(pDX, IDC\_TRAY4\_TEXT, m\_Label4);
              DDX\_Control(pDX, IDC\_TRAY3\_TEXT, m\_Label3);
              DDX\_Control(pDX, IDC\_TRAY2\_TEXT, m\_Label2);
              DDX\_Control(pDX, IDC\_TRAY1\_TEXT, m\_Label1);
              DDX\_Control(pDX, IDC\_STANDARDS\_TRAY\_SGA, m\_StandardsBack);
              DDX\_Control(pDX, IDC\_STANDARDS\_TRAY\_LDA, m\_StandardsLeft);
              //}}AFX\_DATA\_MAP
              DDX\_Control(pDX, IDC\_THUMB1, m\_QueuePos\[0\]);
              DDX\_Control(pDX, IDC\_THUMB2, m\_QueuePos\[1\]);
              DDX\_Control(pDX, IDC\_THUMB5, m\_QueuePos\[2\]);
              DDX\_Control(pDX, IDC\_THUMB6, m\_QueuePos\[3\]);
              

              Roger Allen Sonork 100.10016 yet to be identified being from the planet Paltinmoriumbanfrettybooter

              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