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. RadioButton [modified]

RadioButton [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
16 Posts 6 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.
  • CPalliniC CPallini

    Hamid. wrote:

    You can use of CCButton

    And what about CCCButton? :-D

    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

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

    Oh it was a little mistake(maybe it was abbreviation cpallini.freeproducts.com->CCButton) ;P

    1 Reply Last reply
    0
    • CPalliniC CPallini

      Hamid. wrote:

      You can use of CCButton

      And what about CCCButton? :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      J Offline
      J Offline
      Jhony george
      wrote on last edited by
      #6

      Always joke ah...!

      Born to win...!

      1 Reply Last reply
      0
      • H Hamid Taebi

        You can use of CCButton CButton class or CreateWindow for make them.

        modified on Tuesday, April 22, 2008 7:01 AM

        U Offline
        U Offline
        usyra42
        wrote on last edited by
        #7

        How can we create RadioButtons at runtime Means i have recognised the COM Ports and those i need to display as radiobuttons for User Selection but Number of COM ports may differ sooo i some assistance to how to create radiobuttons dynamically depending on data we get at runtime. for ex we COM1 COM2 ports now i have to get those and create radiobutons but data may change it can only COM1 depending on connnection

        usharani

        H CPalliniC P 3 Replies Last reply
        0
        • U usyra42

          How can we create RadioButtons at runtime Means i have recognised the COM Ports and those i need to display as radiobuttons for User Selection but Number of COM ports may differ sooo i some assistance to how to create radiobuttons dynamically depending on data we get at runtime. for ex we COM1 COM2 ports now i have to get those and create radiobutons but data may change it can only COM1 depending on connnection

          usharani

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

          I think you can use like this for example CButton m_Button[3]; m_Button[0].Create(_T("Port1"),WS_CHILD|BS_RADIOBUTTON|WS_VISIBLE,CRect(0,0,100,23),this,1); ...

          1 Reply Last reply
          0
          • U usyra42

            How can we create RadioButtons at runtime Means i have recognised the COM Ports and those i need to display as radiobuttons for User Selection but Number of COM ports may differ sooo i some assistance to how to create radiobuttons dynamically depending on data we get at runtime. for ex we COM1 COM2 ports now i have to get those and create radiobutons but data may change it can only COM1 depending on connnection

            usharani

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #9

            What about a list (or combo) box? :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • U usyra42

              How can we create RadioButtons at runtime Means i have recognised the COM Ports and those i need to display as radiobuttons for User Selection but Number of COM ports may differ sooo i some assistance to how to create radiobuttons dynamically depending on data we get at runtime. for ex we COM1 COM2 ports now i have to get those and create radiobutons but data may change it can only COM1 depending on connnection

              usharani

              P Offline
              P Offline
              prasad_som
              wrote on last edited by
              #10

              Create buttons on heap for this purpose.

              CButton *pBtns = new CButton[nNumOfPorts];
              pBtns[0].Create(....using radio button style);
              pBtns[1].Create(....using radio button style);
              pBtns[nNumOfPorts-1].Create(....using radio button style);

              CPalliniC 1 Reply Last reply
              0
              • U usyra42

                How can we create Radio Buttons dynamically Using VC++?

                usharani

                modified on Tuesday, April 22, 2008 6:15 AM

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

                In the same way as you would any other button, just use the BS_RADIOBUTTON style.

                "Love people and use things, not love things and use people." - Unknown

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                1 Reply Last reply
                0
                • P prasad_som

                  Create buttons on heap for this purpose.

                  CButton *pBtns = new CButton[nNumOfPorts];
                  pBtns[0].Create(....using radio button style);
                  pBtns[1].Create(....using radio button style);
                  pBtns[nNumOfPorts-1].Create(....using radio button style);

                  CPalliniC Offline
                  CPalliniC Offline
                  CPallini
                  wrote on last edited by
                  #12

                  prasad_som wrote:

                  CButton *pBtns = new CButton[nNumOfPorts]; pBtns->Create(....using radio button style);

                  That is wrong. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                  In testa che avete, signor di Ceprano?

                  P 1 Reply Last reply
                  0
                  • CPalliniC CPallini

                    prasad_som wrote:

                    CButton *pBtns = new CButton[nNumOfPorts]; pBtns->Create(....using radio button style);

                    That is wrong. :)

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                    P Offline
                    P Offline
                    prasad_som
                    wrote on last edited by
                    #13

                    Thanks for correction.

                    CPalliniC 1 Reply Last reply
                    0
                    • P prasad_som

                      Thanks for correction.

                      CPalliniC Offline
                      CPalliniC Offline
                      CPallini
                      wrote on last edited by
                      #14

                      I suggest you to suggest him (:rolleyes:) the final cleanup too. Do you know, when dealing with dynamic allocation, newbies tend to forget it. :)

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                      In testa che avete, signor di Ceprano?

                      P 1 Reply Last reply
                      0
                      • CPalliniC CPallini

                        I suggest you to suggest him (:rolleyes:) the final cleanup too. Do you know, when dealing with dynamic allocation, newbies tend to forget it. :)

                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                        P Offline
                        P Offline
                        prasad_som
                        wrote on last edited by
                        #15

                        He/She has not replied to my reply, obviouslu he has not followed m answer.

                        CPalliniC 1 Reply Last reply
                        0
                        • P prasad_som

                          He/She has not replied to my reply, obviouslu he has not followed m answer.

                          CPalliniC Offline
                          CPalliniC Offline
                          CPallini
                          wrote on last edited by
                          #16

                          Who knows, maybe he silently has. :-D

                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                          In testa che avete, signor di Ceprano?

                          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