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. Creating Control Object Dynamically

Creating Control Object Dynamically

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

    How can I create a control object at runtime dynamically and join it to the dialog. eg. If I want to create many buttons at runtime after the user choosen some options(like no. of buttons he wants to use it).So what can I do. Could anybody helps me please ?:sigh: Dr Abudawood

    M 1 Reply Last reply
    0
    • D drabudawood

      How can I create a control object at runtime dynamically and join it to the dialog. eg. If I want to create many buttons at runtime after the user choosen some options(like no. of buttons he wants to use it).So what can I do. Could anybody helps me please ?:sigh: Dr Abudawood

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

      If using MFC: CButton::Create. If using raw Win32: CreateWindowEx, passing "BUTTON" as the lpClassName parameter. See also the Predefined User Controls[^].

      D 1 Reply Last reply
      0
      • M Mike Dimmick

        If using MFC: CButton::Create. If using raw Win32: CreateWindowEx, passing "BUTTON" as the lpClassName parameter. See also the Predefined User Controls[^].

        D Offline
        D Offline
        drabudawood
        wrote on last edited by
        #3

        Thank you very much MR\ Mike I will test it in MFC. Dr Abudawood

        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