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. Create a dialog

Create a dialog

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelptutorial
10 Posts 6 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.
  • J Offline
    J Offline
    john5632
    wrote on last edited by
    #1

    Hi Experts, How to create a dialog with another. I elborate my problem. I have designed one dialog(D1) with one Tree control at left side. I want ,when I click on any tree item an aonther dialog(D2) box should appear at right side of that dialog(D1) like a lot of contorls appear at right side. Dialog(D2) box is getting appear but this is not attached with first dialog(D1). It can be seperately move. But I want to When I move D1, D2 should move.

    H _ O N B 5 Replies Last reply
    0
    • J john5632

      Hi Experts, How to create a dialog with another. I elborate my problem. I have designed one dialog(D1) with one Tree control at left side. I want ,when I click on any tree item an aonther dialog(D2) box should appear at right side of that dialog(D1) like a lot of contorls appear at right side. Dialog(D2) box is getting appear but this is not attached with first dialog(D1). It can be seperately move. But I want to When I move D1, D2 should move.

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

      For make a new dialog you can use of CDialog class or CreateWindow.

      J 1 Reply Last reply
      0
      • H Hamid Taebi

        For make a new dialog you can use of CDialog class or CreateWindow.

        J Offline
        J Offline
        john5632
        wrote on last edited by
        #3

        I did like this. .. .. CDialog m_Dlg; .. .. m_Dlg.Create(IDD_DLG_SELECT_ALGO,this); m_Dlg.SetWindowPos(this,100,500,400,300,SWP_SHOWWINDOW|SWP_NOMOVE); m_Dlg.ShowWindow(SW_SHOW); But not working.

        H 1 Reply Last reply
        0
        • J john5632

          Hi Experts, How to create a dialog with another. I elborate my problem. I have designed one dialog(D1) with one Tree control at left side. I want ,when I click on any tree item an aonther dialog(D2) box should appear at right side of that dialog(D1) like a lot of contorls appear at right side. Dialog(D2) box is getting appear but this is not attached with first dialog(D1). It can be seperately move. But I want to When I move D1, D2 should move.

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

          Create a modeless dialog, and set it's property to behave like a child.

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          1 Reply Last reply
          0
          • J john5632

            I did like this. .. .. CDialog m_Dlg; .. .. m_Dlg.Create(IDD_DLG_SELECT_ALGO,this); m_Dlg.SetWindowPos(this,100,500,400,300,SWP_SHOWWINDOW|SWP_NOMOVE); m_Dlg.ShowWindow(SW_SHOW); But not working.

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

            Whats the problem?

            J 1 Reply Last reply
            0
            • H Hamid Taebi

              Whats the problem?

              J Offline
              J Offline
              john5632
              wrote on last edited by
              #6

              D2 is displaying in the right side of D1.But it is not attached with D1. When I move D1, D2 remains at same position. It does not bind with D1.

              H 1 Reply Last reply
              0
              • J john5632

                D2 is displaying in the right side of D1.But it is not attached with D1. When I move D1, D2 remains at same position. It does not bind with D1.

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

                See these message :WM_MOVE and WM_MOVING.

                1 Reply Last reply
                0
                • J john5632

                  Hi Experts, How to create a dialog with another. I elborate my problem. I have designed one dialog(D1) with one Tree control at left side. I want ,when I click on any tree item an aonther dialog(D2) box should appear at right side of that dialog(D1) like a lot of contorls appear at right side. Dialog(D2) box is getting appear but this is not attached with first dialog(D1). It can be seperately move. But I want to When I move D1, D2 should move.

                  O Offline
                  O Offline
                  only coding
                  wrote on last edited by
                  #8

                  set WS_CHILD style to D2

                  Are you have gtalk ? please add me: xiangyangzhao@gmail.com

                  1 Reply Last reply
                  0
                  • J john5632

                    Hi Experts, How to create a dialog with another. I elborate my problem. I have designed one dialog(D1) with one Tree control at left side. I want ,when I click on any tree item an aonther dialog(D2) box should appear at right side of that dialog(D1) like a lot of contorls appear at right side. Dialog(D2) box is getting appear but this is not attached with first dialog(D1). It can be seperately move. But I want to When I move D1, D2 should move.

                    N Offline
                    N Offline
                    Nishad S
                    wrote on last edited by
                    #9

                    Change the style as "child" in Styles tab of Dialog Properties. It might be now set as "popup". After that set "Control" in the More Styles tab and "Control Parent" in the Extended Styles tab.

                    - NS - [ODBaseBtn]

                    1 Reply Last reply
                    0
                    • J john5632

                      Hi Experts, How to create a dialog with another. I elborate my problem. I have designed one dialog(D1) with one Tree control at left side. I want ,when I click on any tree item an aonther dialog(D2) box should appear at right side of that dialog(D1) like a lot of contorls appear at right side. Dialog(D2) box is getting appear but this is not attached with first dialog(D1). It can be seperately move. But I want to When I move D1, D2 should move.

                      B Offline
                      B Offline
                      Bram van Kampen
                      wrote on last edited by
                      #10

                      Hi, I'm Not an expert, very few of us would claim to be. Your problem appears not to be the drawing of the Dialog box, (that's quite simple) but the trapping of the event on which you want it drawn. i.e. you want to trap the event of a user clicking on a Tree Control Item, by starting an event handler. That event handler should set up a Dialog box, and call it's DoModal().

                      Bram van Kampen

                      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