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. Problem using DIalogBar

Problem using DIalogBar

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
11 Posts 3 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
    Maverick
    wrote on last edited by
    #1

    When I'm using a DialogBar, with controls on it (particulartly Frames, and Buttons)..... do standard procdedures using a dialogBar in a Doc/View application, make a dialogresource, set an ID for the dialog bar, ID's for the controls...etc... When I implement the code for the button in a dialogbar it works fine.. but when i implement code for a frame control(the message map in CLASSWIZARD is only BN_CLICKED), when i click on the frame when i run the program, it doesn't get executed... How come when iclick on the button control in the dialogbar something gets executed, but when i click on the frame control, nothing gets executed?? is this a bug in Visual C??

    S D 2 Replies Last reply
    0
    • M Maverick

      When I'm using a DialogBar, with controls on it (particulartly Frames, and Buttons)..... do standard procdedures using a dialogBar in a Doc/View application, make a dialogresource, set an ID for the dialog bar, ID's for the controls...etc... When I implement the code for the button in a dialogbar it works fine.. but when i implement code for a frame control(the message map in CLASSWIZARD is only BN_CLICKED), when i click on the frame when i run the program, it doesn't get executed... How come when iclick on the button control in the dialogbar something gets executed, but when i click on the frame control, nothing gets executed?? is this a bug in Visual C??

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      AFAIK, buttons send messages to their parent window, not their owner. (when a dialog bar is not docked, it's parent is no longer the frame window; instead it is a child of a mini-frame created to float it) You'll have derive a class CDialogBar and put the code to handle the button press in that. Then you can forward it on to your frame window if necessary. And if words were wisdom, I'd be talking even more.

      The Offspring, I Choose

      M 2 Replies Last reply
      0
      • S Shog9 0

        AFAIK, buttons send messages to their parent window, not their owner. (when a dialog bar is not docked, it's parent is no longer the frame window; instead it is a child of a mini-frame created to float it) You'll have derive a class CDialogBar and put the code to handle the button press in that. Then you can forward it on to your frame window if necessary. And if words were wisdom, I'd be talking even more.

        The Offspring, I Choose

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

        Actually the messges of my buttons in my Dialog Bars works fine...even if the dialog bar is docked or floating but the messges of the Frame Controls in the Dialog Bar doesn't.... How do I forward messages to my FrameWIndow??

        S 1 Reply Last reply
        0
        • M Maverick

          Actually the messges of my buttons in my Dialog Bars works fine...even if the dialog bar is docked or floating but the messges of the Frame Controls in the Dialog Bar doesn't.... How do I forward messages to my FrameWIndow??

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          Sorry, i'm misunderstanding you. Do you mean the controls on the frame, like the close or maximize buttons, or do you mean a STATIC control drawing an etched frame w/ in the dialog bar? And if words were wisdom, I'd be talking even more.

          The Offspring, I Choose

          M 1 Reply Last reply
          0
          • S Shog9 0

            AFAIK, buttons send messages to their parent window, not their owner. (when a dialog bar is not docked, it's parent is no longer the frame window; instead it is a child of a mini-frame created to float it) You'll have derive a class CDialogBar and put the code to handle the button press in that. Then you can forward it on to your frame window if necessary. And if words were wisdom, I'd be talking even more.

            The Offspring, I Choose

            M Offline
            M Offline
            Maverick
            wrote on last edited by
            #5

            For your information, I made a DialogBar resource template... set the DialogBar's ID, the the button control's ID, and the frame control's ID, after that I go to ClassWizard, and asks me if i want to make a new class or select from an existing class.... I chose cancel and go thruh classwizard anyway.... i don't make a new class... I get my messages thru the ID's.....

            1 Reply Last reply
            0
            • M Maverick

              When I'm using a DialogBar, with controls on it (particulartly Frames, and Buttons)..... do standard procdedures using a dialogBar in a Doc/View application, make a dialogresource, set an ID for the dialog bar, ID's for the controls...etc... When I implement the code for the button in a dialogbar it works fine.. but when i implement code for a frame control(the message map in CLASSWIZARD is only BN_CLICKED), when i click on the frame when i run the program, it doesn't get executed... How come when iclick on the button control in the dialogbar something gets executed, but when i click on the frame control, nothing gets executed?? is this a bug in Visual C??

              D Offline
              D Offline
              David Carkeet
              wrote on last edited by
              #6

              If you look in CodeGuru (sorry..) you'll find a dicussion of a "CInitDialogBar" class which solves just this sort of problem... Cheers, Dave Carkeet.

              1 Reply Last reply
              0
              • S Shog9 0

                Sorry, i'm misunderstanding you. Do you mean the controls on the frame, like the close or maximize buttons, or do you mean a STATIC control drawing an etched frame w/ in the dialog bar? And if words were wisdom, I'd be talking even more.

                The Offspring, I Choose

                M Offline
                M Offline
                Maverick
                wrote on last edited by
                #7

                I mean the Static Control drawing an etched frame within the dialog bar.... when you make a dialog resource, VS has toolbars that lets you draw any kinds of controls in the dialog resource.... The toolbar button that says picture control....

                S 1 Reply Last reply
                0
                • M Maverick

                  I mean the Static Control drawing an etched frame within the dialog bar.... when you make a dialog resource, VS has toolbars that lets you draw any kinds of controls in the dialog resource.... The toolbar button that says picture control....

                  S Offline
                  S Offline
                  Shog9 0
                  wrote on last edited by
                  #8

                  Ok, i understand now. These controls are usually not used for input, so i was confused. Anyway, make sure that SS_NOTIFY is set; you'll then get messages when the user clicks or double-clicks on the control. Not too much else you can do with a frame, really._**

                  Sometimes I only remember, The days when i was young
                  Nowadays no one remembers when they were young and stupid...

                  **_

                  ADEMA, The Way You Like It

                  M 1 Reply Last reply
                  0
                  • S Shog9 0

                    Ok, i understand now. These controls are usually not used for input, so i was confused. Anyway, make sure that SS_NOTIFY is set; you'll then get messages when the user clicks or double-clicks on the control. Not too much else you can do with a frame, really._**

                    Sometimes I only remember, The days when i was young
                    Nowadays no one remembers when they were young and stupid...

                    **_

                    ADEMA, The Way You Like It

                    M Offline
                    M Offline
                    Maverick
                    wrote on last edited by
                    #9

                    OK... how do I use SS_NOTIFY??... i just encountered SS_NOTIFY?? sorry, i'm a bit new VC....:) I'm using it for output and Feedback...... so i need to draw to the frame control manually through code....

                    S 1 Reply Last reply
                    0
                    • M Maverick

                      OK... how do I use SS_NOTIFY??... i just encountered SS_NOTIFY?? sorry, i'm a bit new VC....:) I'm using it for output and Feedback...... so i need to draw to the frame control manually through code....

                      S Offline
                      S Offline
                      Shog9 0
                      wrote on last edited by
                      #10

                      In the dialog editor, bring up properties for the frame. On one of the pages (i forget which) there is a "notify" option._**

                      Sometimes I only remember, The days when i was young
                      Nowadays no one remembers when they were young and stupid...

                      **_

                      ADEMA, The Way You Like It

                      M 1 Reply Last reply
                      0
                      • S Shog9 0

                        In the dialog editor, bring up properties for the frame. On one of the pages (i forget which) there is a "notify" option._**

                        Sometimes I only remember, The days when i was young
                        Nowadays no one remembers when they were young and stupid...

                        **_

                        ADEMA, The Way You Like It

                        M Offline
                        M Offline
                        Maverick
                        wrote on last edited by
                        #11

                        Thats it!! THanks a lot... I got it to work already... thanks very much...:) "Its all right. the gun isn't loaded."

                        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