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. toolBars buttons

toolBars buttons

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

    Hi everybody, i need help. I am working with toolBars and i dont know how i can set the text of the buttons in the toolBar. If any body can help me i will be gratefull.

    T 1 Reply Last reply
    0
    • N neliocc

      Hi everybody, i need help. I am working with toolBars and i dont know how i can set the text of the buttons in the toolBar. If any body can help me i will be gratefull.

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      neliocc wrote: i dont know how i can set the text of the buttons in the toolBar SetWindowText(HANDLE_OF_BUTTON, BUTTON_TEXT);

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta

      N 1 Reply Last reply
      0
      • T ThatsAlok

        neliocc wrote: i dont know how i can set the text of the buttons in the toolBar SetWindowText(HANDLE_OF_BUTTON, BUTTON_TEXT);

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta

        N Offline
        N Offline
        neliocc
        wrote on last edited by
        #3

        I cant get the handle of a button in a toolBar, thats the problem.

        K 1 Reply Last reply
        0
        • N neliocc

          I cant get the handle of a button in a toolBar, thats the problem.

          K Offline
          K Offline
          khan
          wrote on last edited by
          #4

          m_wndToolBar.SetButtonText(0,"this text"); m_wndToolBar.GetToolBarCtrl().SetButtonSize(CSize(22,36)); Just set the button size CSize(22,36) to values which suit you. this is this.

          N 1 Reply Last reply
          0
          • K khan

            m_wndToolBar.SetButtonText(0,"this text"); m_wndToolBar.GetToolBarCtrl().SetButtonSize(CSize(22,36)); Just set the button size CSize(22,36) to values which suit you. this is this.

            N Offline
            N Offline
            neliocc
            wrote on last edited by
            #5

            Yes but i am working with win32 API and i can not do that.

            PJ ArendsP T 2 Replies Last reply
            0
            • N neliocc

              Yes but i am working with win32 API and i can not do that.

              PJ ArendsP Offline
              PJ ArendsP Offline
              PJ Arends
              wrote on last edited by
              #6

              Send a TB_SETBUTTONINFO message to the toolbar.


              "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!


              Honoured as one of The Most Helpful Members of 2004

              Within you lies the power for good; Use it!

              1 Reply Last reply
              0
              • N neliocc

                Yes but i am working with win32 API and i can not do that.

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                neliocc wrote: i am working with win32 API Then Look for TB_SETBUTTONINFO and TB_SETBUTTONWIDTH messages

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta

                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