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. How do I get data from a toolbar to a dialog?

How do I get data from a toolbar to a dialog?

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

    How do I get user input from a toolbar embedded in a CMDIFrameWnd, to a control in a Cdialog called by a CView? Ideally, I would like to open the dialog modal, then take the mouse out of the dialog to click on a button in the toolbar, thereby updating a control in the dialog according to which button was clicked on the toolbar. I presume I need to make the dialog modeless, then somehow disable all other windows except the toolbar. Is that the best way, and if so can you please point me to ways to do that? Otherwise, can I somehow activate the toolbar from the modal dialog when the mouse gets over the toolbar, or gets clicked in the toolbar? Thanks, Chris.

    K 1 Reply Last reply
    0
    • C Chris Corben

      How do I get user input from a toolbar embedded in a CMDIFrameWnd, to a control in a Cdialog called by a CView? Ideally, I would like to open the dialog modal, then take the mouse out of the dialog to click on a button in the toolbar, thereby updating a control in the dialog according to which button was clicked on the toolbar. I presume I need to make the dialog modeless, then somehow disable all other windows except the toolbar. Is that the best way, and if so can you please point me to ways to do that? Otherwise, can I somehow activate the toolbar from the modal dialog when the mouse gets over the toolbar, or gets clicked in the toolbar? Thanks, Chris.

      K Offline
      K Offline
      Kiran Kumar Singani
      wrote on last edited by
      #2

      Hi Chris, U can get the parent window from dialog and convert into appropriate class and get tool bar -> get the status . or else declare a pointer in the mainframe class to ur dialog . send notification any changes in the Tool bar event.

      C 1 Reply Last reply
      0
      • K Kiran Kumar Singani

        Hi Chris, U can get the parent window from dialog and convert into appropriate class and get tool bar -> get the status . or else declare a pointer in the mainframe class to ur dialog . send notification any changes in the Tool bar event.

        C Offline
        C Offline
        Chris Corben
        wrote on last edited by
        #3

        Thankyou Kiran But I remain confused! Currently, ny dialog is modal, so as I understand it, when it is open, the toolbar will not get any messages. I am happy to make the dialog modeless, but if I do, how do I fake modal behaviour? I can see how to disable the parent window, but I want the toolbar to be able to get mouse clicks so I can use it to enter data into the dialog. Thanks, Chris.

        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