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. calling another window from dialog box and display data

calling another window from dialog box and display data

Scheduled Pinned Locked Moved C / C++ / MFC
10 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.
  • W Offline
    W Offline
    With_problem
    wrote on last edited by
    #1

    hello friends, I am working with dialog based application,I have created a menu bar for that,Now i want by clicking a menu option like "quote" it will open a another window and from that window function I want to call other function so taht it start display what in that window.How is that possible. By which function i will do this. thanks

    A V H 3 Replies Last reply
    0
    • W With_problem

      hello friends, I am working with dialog based application,I have created a menu bar for that,Now i want by clicking a menu option like "quote" it will open a another window and from that window function I want to call other function so taht it start display what in that window.How is that possible. By which function i will do this. thanks

      A Offline
      A Offline
      A_Fa
      wrote on last edited by
      #2

      if you can catche handle of a window , then you can do any thing

      W 1 Reply Last reply
      0
      • W With_problem

        hello friends, I am working with dialog based application,I have created a menu bar for that,Now i want by clicking a menu option like "quote" it will open a another window and from that window function I want to call other function so taht it start display what in that window.How is that possible. By which function i will do this. thanks

        V Offline
        V Offline
        Vipin Aravind
        wrote on last edited by
        #3

        All you need is have one more modal dialog and then do a DoModal dialog in the menu command handler.

        Vipin Aravind - MVP

        W 1 Reply Last reply
        0
        • W With_problem

          hello friends, I am working with dialog based application,I have created a menu bar for that,Now i want by clicking a menu option like "quote" it will open a another window and from that window function I want to call other function so taht it start display what in that window.How is that possible. By which function i will do this. thanks

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

          See CWnd::GetParent if Main is Main class you can use this code ion another class

          CMain* m_Main=(CMain*)GetParent();
          m_Main->functiron or data

          _**


          **_

          WhiteSky


          W 1 Reply Last reply
          0
          • V Vipin Aravind

            All you need is have one more modal dialog and then do a DoModal dialog in the menu command handler.

            Vipin Aravind - MVP

            W Offline
            W Offline
            With_problem
            wrote on last edited by
            #5

            Thanks for your reply, Can you pls explain me more.As i am new to CV++ ,so all the concept are not clear to me. If you need more information then pls.

            1 Reply Last reply
            0
            • H Hamid Taebi

              See CWnd::GetParent if Main is Main class you can use this code ion another class

              CMain* m_Main=(CMain*)GetParent();
              m_Main->functiron or data

              _**


              **_

              WhiteSky


              W Offline
              W Offline
              With_problem
              wrote on last edited by
              #6

              Thanks for reply, I need to ask my project is dialog based wil these work with that. If yes what should all other thing/class should i include to make these function work

              K H 2 Replies Last reply
              0
              • A A_Fa

                if you can catche handle of a window , then you can do any thing

                W Offline
                W Offline
                With_problem
                wrote on last edited by
                #7

                Thanks for your reply, How to catche handle of a window so taht i can call all other function from there.So taht window will start display which i am getting from server.

                1 Reply Last reply
                0
                • W With_problem

                  Thanks for reply, I need to ask my project is dialog based wil these work with that. If yes what should all other thing/class should i include to make these function work

                  K Offline
                  K Offline
                  Kiran Pinjala
                  wrote on last edited by
                  #8

                  Priyanka... Let me know whether you want to create another dialog box from this dialog box? If yes Just place this code in the hanlder of that menu item CSecondDlg secDlg; secDlg.Domodal(); if this isn't enough come with your next question.

                  KIRAN PINJARLA

                  W 1 Reply Last reply
                  0
                  • K Kiran Pinjala

                    Priyanka... Let me know whether you want to create another dialog box from this dialog box? If yes Just place this code in the hanlder of that menu item CSecondDlg secDlg; secDlg.Domodal(); if this isn't enough come with your next question.

                    KIRAN PINJARLA

                    W Offline
                    W Offline
                    With_problem
                    wrote on last edited by
                    #9

                    no kiran i dont want to create second dialog, let me expalin you.... I have function which i am calling through dialog box.now i want that by clicking a button it will open a window(which will open untill click to exit) and from that window i will b able to call all other function so that it will start display the data getting from server. Hope i am clear if not pls remind me Thanks for your reply priyanka -- modified at 1:27 Monday 7th August, 2006

                    1 Reply Last reply
                    0
                    • W With_problem

                      Thanks for reply, I need to ask my project is dialog based wil these work with that. If yes what should all other thing/class should i include to make these function work

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

                      if your program dialog yes and see GetParent in msdn this function obtain a pointer to parent window

                      _**


                      **_

                      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