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. POINTER TO DIALOG

POINTER TO DIALOG

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

    I NEED A POINTER TO ANOTHER DIALOG, WOULD SOMEONE PLEASE DETAIL HOW I CAN DO THIS. PLEASE Kind Regards Kevin

    M B R 3 Replies Last reply
    0
    • C Caoimh

      I NEED A POINTER TO ANOTHER DIALOG, WOULD SOMEONE PLEASE DETAIL HOW I CAN DO THIS. PLEASE Kind Regards Kevin

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      CDialog* pDlg = &AnotherDialog; please say more, and we'll be glad to help you more ...


      Maximilien Lincourt Your Head A Splode - Strong Bad

      C 1 Reply Last reply
      0
      • C Caoimh

        I NEED A POINTER TO ANOTHER DIALOG, WOULD SOMEONE PLEASE DETAIL HOW I CAN DO THIS. PLEASE Kind Regards Kevin

        B Offline
        B Offline
        BlackDice
        wrote on last edited by
        #3

        also see my answer to 'MFC Dialog member sharing'. You should be able to see it by clicking 'next' at the bottom of this page If it's broken, I probably did it bdiamond

        1 Reply Last reply
        0
        • M Maximilien

          CDialog* pDlg = &AnotherDialog; please say more, and we'll be glad to help you more ...


          Maximilien Lincourt Your Head A Splode - Strong Bad

          C Offline
          C Offline
          Caoimh
          wrote on last edited by
          #4

          What I'm trying to do is as follows: I've DialogA and DialogB. DialogA has a EDIT BOX (say EBOX1). Dialog B consists of a Button (say BUTTON1). When I press BUTTON1 on DialogB, I want a message to appear on EBOX1 of DialogA. I would like to use the API SetDlgItemText Suggestion very much appreciated.

          D M 2 Replies Last reply
          0
          • C Caoimh

            What I'm trying to do is as follows: I've DialogA and DialogB. DialogA has a EDIT BOX (say EBOX1). Dialog B consists of a Button (say BUTTON1). When I press BUTTON1 on DialogB, I want a message to appear on EBOX1 of DialogA. I would like to use the API SetDlgItemText Suggestion very much appreciated.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Haven't you asked this same question twice before? Are the responses you're getting not working? The ones I've seen look right on the money.


            "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

            1 Reply Last reply
            0
            • C Caoimh

              What I'm trying to do is as follows: I've DialogA and DialogB. DialogA has a EDIT BOX (say EBOX1). Dialog B consists of a Button (say BUTTON1). When I press BUTTON1 on DialogB, I want a message to appear on EBOX1 of DialogA. I would like to use the API SetDlgItemText Suggestion very much appreciated.

              M Offline
              M Offline
              Maximilien
              wrote on last edited by
              #6

              you need to pass DialogA to DialogB to be able to access it. something like this draft :

              ...
              /// dlgA already created somewhere.
              DialogB dlgB;
              dlgB.SetOtherDialog( &dlgA );
              ...

              DialogB::SetOtherDialog( DialogA* pDlgA )
              {
              m_pDlgA = pDlgA;
              }
              ...
              DialogB::OnButtonClick(/*whatever*/)
              {
              if ( m_pDlgA != NULL )
              {
              m_pDlgA->SetTextOnControl( /* some text */ );
              }
              }


              Maximilien Lincourt Your Head A Splode - Strong Bad

              1 Reply Last reply
              0
              • C Caoimh

                I NEED A POINTER TO ANOTHER DIALOG, WOULD SOMEONE PLEASE DETAIL HOW I CAN DO THIS. PLEASE Kind Regards Kevin

                R Offline
                R Offline
                Robert A T Kaldy
                wrote on last edited by
                #7

                Where have you defined the dialog classes? In MainFrame or directly in some function? Robert-Antonio "CRAY is the only computer, which runs an endless loop in just 4 hours"

                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