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. How do you add checkbox controls at runtime

How do you add checkbox controls at runtime

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

    Can anyone help provide a method to add checkbox controls programatically. I would like to read in a file that contains the names of the checkboxes to be created and displayed. The file contents will not stay the same thus the need to create these at runtime. :confused: Thanks. sd

    W H A 3 Replies Last reply
    0
    • S Sparky D

      Can anyone help provide a method to add checkbox controls programatically. I would like to read in a file that contains the names of the checkboxes to be created and displayed. The file contents will not stay the same thus the need to create these at runtime. :confused: Thanks. sd

      W Offline
      W Offline
      Waldermort
      wrote on last edited by
      #2

      CreateWindow()

      1 Reply Last reply
      0
      • S Sparky D

        Can anyone help provide a method to add checkbox controls programatically. I would like to read in a file that contains the names of the checkboxes to be created and displayed. The file contents will not stay the same thus the need to create these at runtime. :confused: Thanks. sd

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

        Or you can use of

        CButton m_Button;
        m_Button.Create("Test",WS_CHILD|BS_AUTOCHECKBOX|WS_VISIBLE,CRect(0,0,100,23),this,/*id button*/1);
        

        WhiteSky


        1 Reply Last reply
        0
        • S Sparky D

          Can anyone help provide a method to add checkbox controls programatically. I would like to read in a file that contains the names of the checkboxes to be created and displayed. The file contents will not stay the same thus the need to create these at runtime. :confused: Thanks. sd

          A Offline
          A Offline
          Abhijeet Rajput
          wrote on last edited by
          #4

          Hello, We cants add checkbox at run time. What we can do is: Add the Check Box in ur Dialog. After you read the Name of checkbox from file,u can change the lable of ur check box easily. If you want to display check box at run time only then you can hide them previously and then use ShowWindow(SW_SHOW) method to make those check box visible. Abhijeet

          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