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. Buttons on a DialogBar

Buttons on a DialogBar

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

    Hi all. I have a DialogBar which I've added to my SDI application. I create the Dialog resource with some text areas and buttons in Resource View and add it to the application, docked at the bottom. All is well. However, the buttons are grayed out as though they're disabled. I can get a handle to the CButton at runtime and it does indeed think its enabeled. Checkboxes, radio buttons, list boxes, etc. all seem to work without looking disabled. What's the deal? Code that adds the dialog bar, in CMainFrame::OnCreate : if (!m_wndTransBar.Create(this, IDD_TRANS_BAR, CBRS_BOTTOM, IDD_TRANS_BAR)) { TRACE0("Failed to create translation bar\n") ; return -1 ; }

    B 1 Reply Last reply
    0
    • M MattyBee

      Hi all. I have a DialogBar which I've added to my SDI application. I create the Dialog resource with some text areas and buttons in Resource View and add it to the application, docked at the bottom. All is well. However, the buttons are grayed out as though they're disabled. I can get a handle to the CButton at runtime and it does indeed think its enabeled. Checkboxes, radio buttons, list boxes, etc. all seem to work without looking disabled. What's the deal? Code that adds the dialog bar, in CMainFrame::OnCreate : if (!m_wndTransBar.Create(this, IDD_TRANS_BAR, CBRS_BOTTOM, IDD_TRANS_BAR)) { TRACE0("Failed to create translation bar\n") ; return -1 ; }

      B Offline
      B Offline
      Brian Shifrin
      wrote on last edited by
      #2

      Have you added handlers for your toolbar to the mainframe class ON_COMMAND_RANGE(ID_DYNAMIC_START, ID_DYNAMIC_END, OnDynamicCommand)ON_UPDATE_COMMAND_UI_RANGE(ID_DYNAMIC_START, ID_DYNAMIC_END, OnUpdateDynamicCommand) ??? Brian

      M 1 Reply Last reply
      0
      • B Brian Shifrin

        Have you added handlers for your toolbar to the mainframe class ON_COMMAND_RANGE(ID_DYNAMIC_START, ID_DYNAMIC_END, OnDynamicCommand)ON_UPDATE_COMMAND_UI_RANGE(ID_DYNAMIC_START, ID_DYNAMIC_END, OnUpdateDynamicCommand) ??? Brian

        M Offline
        M Offline
        MattyBee
        wrote on last edited by
        #3

        Aha! Didn't know that just not adding a handler would cause it to draw disabled. Thanks much for the help. - Matt

        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