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. Dropdown Dialogs

Dropdown Dialogs

Scheduled Pinned Locked Moved C / C++ / MFC
comquestion
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
    Neal Stublen
    wrote on last edited by
    #1

    I am looking to implement a button control that drops down a dialog box when clicked. Can anyone point me to an existing implementation of something like this? Thanks, Neal Stublen http://www.awesoftware.com

    D J C 3 Replies Last reply
    0
    • N Neal Stublen

      I am looking to implement a button control that drops down a dialog box when clicked. Can anyone point me to an existing implementation of something like this? Thanks, Neal Stublen http://www.awesoftware.com

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Neal Stublen wrote: ...drops down a dialog box... What do you mean by that?

      N 1 Reply Last reply
      0
      • N Neal Stublen

        I am looking to implement a button control that drops down a dialog box when clicked. Can anyone point me to an existing implementation of something like this? Thanks, Neal Stublen http://www.awesoftware.com

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        Do not have the code with me but this is how I do it: 1) Create a normal dialog box. 2) Use a piture control to make line across the dialog box, where the fold will be. 3) Uncheck visable in the piture controls' properties, unless you want it visable when box is unfolded. 4) When dialog box is initialize get and save the size of the dialog box. Then get the rectangle for the piture control and use it to set the folded size (dlgRect.bottom = pictRect.top). (make you are using screen coordinates) Use MoveWindow() to set new size. 5) You should have added a button, to the unfolded portion of you dialog, that is used to tell it to unfold (normaly called Advanced). Add a handler for that button so that when it is pressed you can resore the dialog to its' origanal size. That is about all there is to it. Trust in the code Luke. Yea right!

        N 1 Reply Last reply
        0
        • D David Crow

          Neal Stublen wrote: ...drops down a dialog box... What do you mean by that?

          N Offline
          N Offline
          Neal Stublen
          wrote on last edited by
          #4

          There is some code around CodeProject.com that will dropdown a menu just below a button when the button is clicked (like the "Back" or "Forward" buttons on the Internet Explorer toolbar, or the "Views" button on the Windows Explorer toolbar). Instead of dropping down a popup menu, I want to drop down a dialog box just under the button. When the user clicks outside the dialog box, it will go away. Thanks, Neal Stublen http://www.awesoftware.com

          1 Reply Last reply
          0
          • J John R Shaw

            Do not have the code with me but this is how I do it: 1) Create a normal dialog box. 2) Use a piture control to make line across the dialog box, where the fold will be. 3) Uncheck visable in the piture controls' properties, unless you want it visable when box is unfolded. 4) When dialog box is initialize get and save the size of the dialog box. Then get the rectangle for the piture control and use it to set the folded size (dlgRect.bottom = pictRect.top). (make you are using screen coordinates) Use MoveWindow() to set new size. 5) You should have added a button, to the unfolded portion of you dialog, that is used to tell it to unfold (normaly called Advanced). Add a handler for that button so that when it is pressed you can resore the dialog to its' origanal size. That is about all there is to it. Trust in the code Luke. Yea right!

            N Offline
            N Offline
            Neal Stublen
            wrote on last edited by
            #5

            Thanks for the assistance, butI think I wasn't clear enough in my question... There is some code around CodeProject.com that will dropdown a menu just below a button when the button is clicked (like the "Back" or "Forward" buttons on the Internet Explorer toolbar, or the "Views" button on the Windows Explorer toolbar). Instead of dropping down a popup menu, I want to drop down a dialog box just under the button. When the user clicks outside the dialog box, it will go away. Thanks, Neal Stublen http://www.awesoftware.com

            J 1 Reply Last reply
            0
            • N Neal Stublen

              I am looking to implement a button control that drops down a dialog box when clicked. Can anyone point me to an existing implementation of something like this? Thanks, Neal Stublen http://www.awesoftware.com

              C Offline
              C Offline
              Chris Richardson
              wrote on last edited by
              #6

              This link may be of help: http://www.codeproject.com/useritems/RGBA_Colour_Control.asp[^] It drops a dialog box off of a static control, but the concept is the same. Chris Richardson You can stash and you can seize In dreams begin, responsibilities
              U2 - Acrobat[^]
              Stop being PC and accounting for everyone and his momma's timeframe. Just enjoy your :beer: - Rohit Sinha in the content-challenged thread

              1 Reply Last reply
              0
              • N Neal Stublen

                Thanks for the assistance, butI think I wasn't clear enough in my question... There is some code around CodeProject.com that will dropdown a menu just below a button when the button is clicked (like the "Back" or "Forward" buttons on the Internet Explorer toolbar, or the "Views" button on the Windows Explorer toolbar). Instead of dropping down a popup menu, I want to drop down a dialog box just under the button. When the user clicks outside the dialog box, it will go away. Thanks, Neal Stublen http://www.awesoftware.com

                J Offline
                J Offline
                John R Shaw
                wrote on last edited by
                #7

                Expect an e-mail from me later to night, if you have not received it by tomorrow then send me a reminder via e-mail(subject: drop down dialog). I have just what you are looking for at the home. It requires a CDialog derived class to catch the mouse and help position the dialog, and TrackMenue() to pop it up. I was thinking of writing a aticale on this now I have a reason too. Trust in the code Luke. Yea right!

                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