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. Dialog Question and Combo/List Box Question

Dialog Question and Combo/List Box Question

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadmindata-structureshelptutorial
6 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.
  • L Offline
    L Offline
    LighthouseJ
    wrote on last edited by
    #1

    I've tried to find help on here and I didn't find the answer, or recognized when something did tell me the answer. First, the dialog question. When I create an SDI or MDI project, the document that's created just has a white space which I draw in. I want to replace that with a tree control and I don't know how to do that. Is that white space something set and called for somewhere or is it just a void? I want to put a tree control in it's place (bevel and all) and I don't see where to do that. Second, the combo/list box question. How do I make a custom list box like the one in Windows SP2's available wireless network dialog. Under it says "Choose a wireless network" and each large item is in a list box of sorts but it has all kinds of things inside. How do I make that, it won't be as complex as that, but it'll be too complex than just text. I figure I'll override the combo box class but I can't find any info on how to actually do it all. Thanks in advance, Nate.

    C R 2 Replies Last reply
    0
    • L LighthouseJ

      I've tried to find help on here and I didn't find the answer, or recognized when something did tell me the answer. First, the dialog question. When I create an SDI or MDI project, the document that's created just has a white space which I draw in. I want to replace that with a tree control and I don't know how to do that. Is that white space something set and called for somewhere or is it just a void? I want to put a tree control in it's place (bevel and all) and I don't see where to do that. Second, the combo/list box question. How do I make a custom list box like the one in Windows SP2's available wireless network dialog. Under it says "Choose a wireless network" and each large item is in a list box of sorts but it has all kinds of things inside. How do I make that, it won't be as complex as that, but it'll be too complex than just text. I figure I'll override the combo box class but I can't find any info on how to actually do it all. Thanks in advance, Nate.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      LighthouseJ wrote:

      I want to replace that with a tree control and I don't know how to do that

      I forget the name of it, but the class you derive your view from should be something like CFormView, and then you get a dialog template you can put controls on for the view. Christian Graus - Microsoft MVP - C++

      1 Reply Last reply
      0
      • L LighthouseJ

        I've tried to find help on here and I didn't find the answer, or recognized when something did tell me the answer. First, the dialog question. When I create an SDI or MDI project, the document that's created just has a white space which I draw in. I want to replace that with a tree control and I don't know how to do that. Is that white space something set and called for somewhere or is it just a void? I want to put a tree control in it's place (bevel and all) and I don't see where to do that. Second, the combo/list box question. How do I make a custom list box like the one in Windows SP2's available wireless network dialog. Under it says "Choose a wireless network" and each large item is in a list box of sorts but it has all kinds of things inside. How do I make that, it won't be as complex as that, but it'll be too complex than just text. I figure I'll override the combo box class but I can't find any info on how to actually do it all. Thanks in advance, Nate.

        R Offline
        R Offline
        rahulv
        wrote on last edited by
        #3

        As far as your first question goes. The View that you are having is a normal view where u draw. If you want to put a Tree Control in there, you have couple of ways to achieve that. 1. You can try using CFormView and in the dialog box u can have tree ctrl view. 2. If you want a drawing view also with this view, you can put a frame in it and make it the parent of another view. You can do lot of different stuff just by using child parent relationship and types of views. You would be surprised to see what all. Just try a little innovation and creativity and you have it. Second question I am not sure exactly what you are trying to achieve. In any case you can create your own activeX control which contains both list ctrl and combo box etc. You can combine both of them with no big difficulty. If you are specific I would be able to help you.

        L 1 Reply Last reply
        0
        • R rahulv

          As far as your first question goes. The View that you are having is a normal view where u draw. If you want to put a Tree Control in there, you have couple of ways to achieve that. 1. You can try using CFormView and in the dialog box u can have tree ctrl view. 2. If you want a drawing view also with this view, you can put a frame in it and make it the parent of another view. You can do lot of different stuff just by using child parent relationship and types of views. You would be surprised to see what all. Just try a little innovation and creativity and you have it. Second question I am not sure exactly what you are trying to achieve. In any case you can create your own activeX control which contains both list ctrl and combo box etc. You can combine both of them with no big difficulty. If you are specific I would be able to help you.

          L Offline
          L Offline
          LighthouseJ
          wrote on last edited by
          #4

          To clarify the second question... The standard list box is just filled with a line of text. I'm looking to build a list box like the one used in the list of wireless networks box in Windows. In there, each item has a couple text items and pictures. Another example would be the Add/Remove Programs dialog, where it has the program icon, the title of the software package, more text elements and a button or two. I want to make each item taller, fill it with multiple text items and possibly a picture. I'm thinking I could just derive a class from the regular tree view, and proceed but I don't know what to do. ps. I'm investigating CFormView now, thanks to Christian Gaus and yourself.

          C 1 Reply Last reply
          0
          • L LighthouseJ

            To clarify the second question... The standard list box is just filled with a line of text. I'm looking to build a list box like the one used in the list of wireless networks box in Windows. In there, each item has a couple text items and pictures. Another example would be the Add/Remove Programs dialog, where it has the program icon, the title of the software package, more text elements and a button or two. I want to make each item taller, fill it with multiple text items and possibly a picture. I'm thinking I could just derive a class from the regular tree view, and proceed but I don't know what to do. ps. I'm investigating CFormView now, thanks to Christian Gaus and yourself.

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            LighthouseJ wrote:

            CFormView

            Yay - I got it right !!!

            LighthouseJ wrote:

            I want to make each item taller, fill it with multiple text items and possibly a picture.

            You can derive a class from the tree view, and make it owner drawn. That means you write the code to show the text and image, at whatever height you like ( well, you can change the height of a menu item, I assume you can do it for a tree item also ). Christian Graus - Microsoft MVP - C++

            L 1 Reply Last reply
            0
            • C Christian Graus

              LighthouseJ wrote:

              CFormView

              Yay - I got it right !!!

              LighthouseJ wrote:

              I want to make each item taller, fill it with multiple text items and possibly a picture.

              You can derive a class from the tree view, and make it owner drawn. That means you write the code to show the text and image, at whatever height you like ( well, you can change the height of a menu item, I assume you can do it for a tree item also ). Christian Graus - Microsoft MVP - C++

              L Offline
              L Offline
              LighthouseJ
              wrote on last edited by
              #6

              I think the CFormView will be fine, I've just broken the first chip off the CTreeCtrl block. As far as the owner drawn thing, I want to do that to a list box, not the tree view from the previous problem, but I have no doubt the list view can be owner drawn. That's for another day.

              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