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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help me in creating a control

Help me in creating a control

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
5 Posts 5 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.
  • R Offline
    R Offline
    Raj Prathap
    wrote on last edited by
    #1

    Hi, I need some help in creating a control. I need to have a button, which is nothing but the file browse button. But on the button one more down arrow will be there to show/allow to select the recent five files. When the user clicks on the arrow, recent list will be displayed. If user clicks on the button then the file browse dialog will be popped up. I know how to open the file browse dialog, but is ther any control which displays the arrow. Thanks in advance Pratap

    W T J H 4 Replies Last reply
    0
    • R Raj Prathap

      Hi, I need some help in creating a control. I need to have a button, which is nothing but the file browse button. But on the button one more down arrow will be there to show/allow to select the recent five files. When the user clicks on the arrow, recent list will be displayed. If user clicks on the button then the file browse dialog will be popped up. I know how to open the file browse dialog, but is ther any control which displays the arrow. Thanks in advance Pratap

      W Offline
      W Offline
      Waldermort
      wrote on last edited by
      #2

      If I understand you correctly, you need to create two buttons, one to open the fie browser dialog and another to display the last files. Perhaps you could use a context menu for the latter. If you change the style for the menu button ( remove the borders etc ) you can create the illusion of a single button. Using two buttons will also make your life easier when trapping the messages. There is no button which contains an arrow that I know of, you will have to add a bitmap to the button. Either add a bitmap to your resources or create it at runtime. Or, depending on the font you are using, there may be an arrow character that you could use.

      1 Reply Last reply
      0
      • R Raj Prathap

        Hi, I need some help in creating a control. I need to have a button, which is nothing but the file browse button. But on the button one more down arrow will be there to show/allow to select the recent five files. When the user clicks on the arrow, recent list will be displayed. If user clicks on the button then the file browse dialog will be popped up. I know how to open the file browse dialog, but is ther any control which displays the arrow. Thanks in advance Pratap

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        humm.. in continuation with waldermort.. you can add List Control on fly on click of button!

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you

        1 Reply Last reply
        0
        • R Raj Prathap

          Hi, I need some help in creating a control. I need to have a button, which is nothing but the file browse button. But on the button one more down arrow will be there to show/allow to select the recent five files. When the user clicks on the arrow, recent list will be displayed. If user clicks on the button then the file browse dialog will be popped up. I know how to open the file browse dialog, but is ther any control which displays the arrow. Thanks in advance Pratap

          J Offline
          J Offline
          Joan M
          wrote on last edited by
          #4

          You can always try to find a button class that would allow you to add images there, and then using pretranslatemessage to try yo read the position in which the mouse was when the OnLButtonUp was received, depending on that position you could react in different ways. A good class for that could be CButtonST. Hope this helps.

          https://www.robotecnik.com freelance robots, PLC and CNC programmer.

          1 Reply Last reply
          0
          • R Raj Prathap

            Hi, I need some help in creating a control. I need to have a button, which is nothing but the file browse button. But on the button one more down arrow will be there to show/allow to select the recent five files. When the user clicks on the arrow, recent list will be displayed. If user clicks on the button then the file browse dialog will be popped up. I know how to open the file browse dialog, but is ther any control which displays the arrow. Thanks in advance Pratap

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Its interesting I think your answer yesterday but I dont know its on edit section or button section on the codeproject ;)


            WhiteSky


            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