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 boxes linking

edit boxes linking

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

    Hello; 1)I need a way to link 225 edit boxes as one group and give each one of them an index and call them individually by their indices instead of their IDs. after that i will take their inputs to fill up a matrix 15*15. 2)the above technique i have made to make a matrix 15*15 of user defined inputs. if anyone has another elegant technique which enables me to fill a matrix 15*15 with the user inputs , i'll be glad to hear from him. i don't want to use the excel spread sheet active X control !! thx Eliyah

    D J 2 Replies Last reply
    0
    • O Oriented

      Hello; 1)I need a way to link 225 edit boxes as one group and give each one of them an index and call them individually by their indices instead of their IDs. after that i will take their inputs to fill up a matrix 15*15. 2)the above technique i have made to make a matrix 15*15 of user defined inputs. if anyone has another elegant technique which enables me to fill a matrix 15*15 with the user inputs , i'll be glad to hear from him. i don't want to use the excel spread sheet active X control !! thx Eliyah

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Oriented wrote: i don't want to use the excel spread sheet active X control !! How about a grid control, then?


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      1 Reply Last reply
      0
      • O Oriented

        Hello; 1)I need a way to link 225 edit boxes as one group and give each one of them an index and call them individually by their indices instead of their IDs. after that i will take their inputs to fill up a matrix 15*15. 2)the above technique i have made to make a matrix 15*15 of user defined inputs. if anyone has another elegant technique which enables me to fill a matrix 15*15 with the user inputs , i'll be glad to hear from him. i don't want to use the excel spread sheet active X control !! thx Eliyah

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        Two possible approaches: 1) Make sure the IDs are in cosecutive order then access them like so HWND hCtrl = GetDlgItem(ID_EDIT1+nIndex), or something like that. 2) Create an array containing the IDs of the controls then access them like so HWND hCtrl = GetDlgItem(idArray[nIndex]). These are simple methods that do not require any external controls other than the edit boxes. INTP

        B 1 Reply Last reply
        0
        • J John R Shaw

          Two possible approaches: 1) Make sure the IDs are in cosecutive order then access them like so HWND hCtrl = GetDlgItem(ID_EDIT1+nIndex), or something like that. 2) Create an array containing the IDs of the controls then access them like so HWND hCtrl = GetDlgItem(idArray[nIndex]). These are simple methods that do not require any external controls other than the edit boxes. INTP

          B Offline
          B Offline
          Branislav
          wrote on last edited by
          #4

          maybe you think something like this: for(i = 0; i < 15; i++) { for(j = 0; j < 15; j++) { nIndex = i*15 + j; // calculate matrix like arrow M[j][i] = X(ID_EDIT1 + nIndex); // fill up matrix } } rgrds

          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