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. embed multiple child dialogs on main dialog

embed multiple child dialogs on main dialog

Scheduled Pinned Locked Moved C / C++ / MFC
designdata-structurestutorial
6 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
    Raghunandan S
    wrote on last edited by
    #1

    Hi All, I need to design a dialog box which has 2 sections. the left section is a tree control and right section displays various controls.Based on the user's selection in the tree control, I need to display different controls(like property pages...)in the right section.I have created separate dialogs for each of the selections and I need to embed this template onto the main dialog upon user's selection.Please let me know how to achieve this. Thanks in advance Raghu

    L _ G 3 Replies Last reply
    0
    • R Raghunandan S

      Hi All, I need to design a dialog box which has 2 sections. the left section is a tree control and right section displays various controls.Based on the user's selection in the tree control, I need to display different controls(like property pages...)in the right section.I have created separate dialogs for each of the selections and I need to embed this template onto the main dialog upon user's selection.Please let me know how to achieve this. Thanks in advance Raghu

      L Offline
      L Offline
      Laxman Auti
      wrote on last edited by
      #2

      Raghunandan wrote:

      need to design a dialog box which has 2 sections. the left section is a tree control and right section displays various controls.Based on the user's selection in the tree control, I need to display different controls(like property pages...)in the right section.I have created separate dialogs for each of the selections and I need to embed this template onto the main dialog upon user's selection.Please let me know how to achieve this.

      Make the other dialogs as child and use the following code to create the dialogs in main Dialog. CDialog *dlg=new CDialog() dlg->Create(Dialog ID); dlg->ShowWindow(SW_SHOW); Use MoveWindow to set the dialog at appropriate position. or set the dialog co-ordinates. Knock out 't' from can't, You can if you think you can :cool:

      1 Reply Last reply
      0
      • R Raghunandan S

        Hi All, I need to design a dialog box which has 2 sections. the left section is a tree control and right section displays various controls.Based on the user's selection in the tree control, I need to display different controls(like property pages...)in the right section.I have created separate dialogs for each of the selections and I need to embed this template onto the main dialog upon user's selection.Please let me know how to achieve this. Thanks in advance Raghu

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        You can use SetWindowPos and put the dialogs in modeless form. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

        1 Reply Last reply
        0
        • R Raghunandan S

          Hi All, I need to design a dialog box which has 2 sections. the left section is a tree control and right section displays various controls.Based on the user's selection in the tree control, I need to display different controls(like property pages...)in the right section.I have created separate dialogs for each of the selections and I need to embed this template onto the main dialog upon user's selection.Please let me know how to achieve this. Thanks in advance Raghu

          G Offline
          G Offline
          Ganesh_T
          wrote on last edited by
          #4

          Set the Style property of Dialogs as child . Now do as follows in your implementation file : CDialog *dlg= new CChildDialog(); dlg->SetWindowPos(...); dlg->ShowWindow(SW_SHOW); Cheers "Peace of mind through Technology"

          R 1 Reply Last reply
          0
          • G Ganesh_T

            Set the Style property of Dialogs as child . Now do as follows in your implementation file : CDialog *dlg= new CChildDialog(); dlg->SetWindowPos(...); dlg->ShowWindow(SW_SHOW); Cheers "Peace of mind through Technology"

            R Offline
            R Offline
            Raghunandan S
            wrote on last edited by
            #5

            the problem with these solutions are that the child dialog get closed upon pressing escape or enter when the focus in any of the controls Raghu

            H 1 Reply Last reply
            0
            • R Raghunandan S

              the problem with these solutions are that the child dialog get closed upon pressing escape or enter when the focus in any of the controls Raghu

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

              See Here[^] maybe it is some helpful to you you need to override OnOk and OnCancel_**


              **_

              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