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. ReBar - how to set button state on it?

ReBar - how to set button state on it?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
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
    Darked developer
    wrote on last edited by
    #1

    Good Day. Please, can you give me an example how can I change state of the button with some id? I do like this: m_wndReBar.Create(this); m_wndReBar.AddBar(&m_wndToolBar); ... m_wndToolBar.SendMessage(TB_SETSTATE, ID, MAKELONG(TBSTATE_ENABLED, 0)); ... But nothing changes. What's wrong? Or what another ways exists to change the state? Nulla dies sine linea !!!

    D 1 Reply Last reply
    0
    • D Darked developer

      Good Day. Please, can you give me an example how can I change state of the button with some id? I do like this: m_wndReBar.Create(this); m_wndReBar.AddBar(&m_wndToolBar); ... m_wndToolBar.SendMessage(TB_SETSTATE, ID, MAKELONG(TBSTATE_ENABLED, 0)); ... But nothing changes. What's wrong? Or what another ways exists to change the state? Nulla dies sine linea !!!

      D Offline
      D Offline
      Darked developer
      wrote on last edited by
      #2

      And if I have a button in ReBar how can I change state of it? Nulla dies sine linea !!!

      P 1 Reply Last reply
      0
      • D Darked developer

        And if I have a button in ReBar how can I change state of it? Nulla dies sine linea !!!

        P Offline
        P Offline
        pc_dev
        wrote on last edited by
        #3

        To change the state of button on DialogBar I have used for Disable m_wndToolBar.GetDlgItem(IDC_BUTTON)->EnableWindow(FALSE); for Enable m_wndToolBar.GetDlgItem(IDC_BUTTON)->EnableWindow(TRUE); For unPressed m_wndToolBar.CheckDlgButton(IDC_BUTTON,BST_UNCHECKED); For Pressed m_wndToolBar.CheckDlgButton(IDC_BUTTON,BST_CHECKED); I thing it will also work for Rebars

        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