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. dynamic pictureBox creation

dynamic pictureBox creation

Scheduled Pinned Locked Moved C / C++ / MFC
5 Posts 3 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
    sarah_malik
    wrote on last edited by
    #1

    Hi all, I have a form that contains one button and one textbox, the textbox will take a number that will be passed to another form. I have done this successfully. The thing is that I need the second form to create a number of pictureboxes = the number received from the first form. Any ideas?

    H 1 Reply Last reply
    0
    • S sarah_malik

      Hi all, I have a form that contains one button and one textbox, the textbox will take a number that will be passed to another form. I have done this successfully. The thing is that I need the second form to create a number of pictureboxes = the number received from the first form. Any ideas?

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Do you want to get values of form1 on the form2


      WhiteSky


      S 1 Reply Last reply
      0
      • H Hamid Taebi

        Do you want to get values of form1 on the form2


        WhiteSky


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

        nope, I've done this. what I want is to create a number of pictureboxes in form2 that equals the number received from form1. thanks,

        M 1 Reply Last reply
        0
        • S sarah_malik

          nope, I've done this. what I want is to create a number of pictureboxes in form2 that equals the number received from form1. thanks,

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

          something like this very pseudo-code code ? :

          //...
          std::vector myPictureBoxVector;
          for ( int i = 0; i < NumberFromForm1; i++ )
          {
          CStatic pStatic = new CStatic;

          CRect rect;
          ComputePosition( rect ); /// <- this will compute the position of the picture box
          pStatic->Create( ... );

          myPictureBoxVector.push_back( pStatic );
          //...
          }
          //...


          Maximilien Lincourt Your Head A Splode - Strong Bad

          S 1 Reply Last reply
          0
          • M Maximilien

            something like this very pseudo-code code ? :

            //...
            std::vector myPictureBoxVector;
            for ( int i = 0; i < NumberFromForm1; i++ )
            {
            CStatic pStatic = new CStatic;

            CRect rect;
            ComputePosition( rect ); /// <- this will compute the position of the picture box
            pStatic->Create( ... );

            myPictureBoxVector.push_back( pStatic );
            //...
            }
            //...


            Maximilien Lincourt Your Head A Splode - Strong Bad

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

            thanks alot :)

            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