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 Buttons in Dialog Box

Dynamic Buttons in Dialog Box

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 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.
  • M Offline
    M Offline
    mr2003
    wrote on last edited by
    #1

    Hi, In my application, MDI, I have to read an output file in one of the dialog boxes. According to the output file, lets say 6 is read in the file. I then have to make 6 Buttons in that Dialog box. the number 6 could change, so I would like to know how to make it dynamic. Any ideas? Ehsan Behboudi

    A 1 Reply Last reply
    0
    • M mr2003

      Hi, In my application, MDI, I have to read an output file in one of the dialog boxes. According to the output file, lets say 6 is read in the file. I then have to make 6 Buttons in that Dialog box. the number 6 could change, so I would like to know how to make it dynamic. Any ideas? Ehsan Behboudi

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      CButton:Create() would be a great start :) Just call this function inside a for loop or something and space the buttons accordingly. You'll probably have to handle button clicks inside OnCommand() though instead of MFC message map function. Cheers I'm drinking triples, seeing double and acting single :cool:

      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