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. How to change parents Text prperty label from child dialog box

How to change parents Text prperty label from child dialog box

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

    Hi, My query is MFC related to Dialog box. I want to change the Text property label of parent dialog box from its child dialog file. How to change Text lable of parent dialog box from its child dialog file? Thanks in advance -Ramesh.

    O P 2 Replies Last reply
    0
    • R RamL

      Hi, My query is MFC related to Dialog box. I want to change the Text property label of parent dialog box from its child dialog file. How to change Text lable of parent dialog box from its child dialog file? Thanks in advance -Ramesh.

      O Offline
      O Offline
      Owner drawn
      wrote on last edited by
      #2

      Use GetParent() from the Child Dialog. GetParent()->SetWindowText("New title");:-D

      Jesus Loves You and Me :)

      --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

      R 1 Reply Last reply
      0
      • O Owner drawn

        Use GetParent() from the Child Dialog. GetParent()->SetWindowText("New title");:-D

        Jesus Loves You and Me :)

        --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

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

        Thanks, But how to specify the Parents perticular Text property ID to change its lable from its child dialog file. -Ramesh

        O 1 Reply Last reply
        0
        • R RamL

          Thanks, But how to specify the Parents perticular Text property ID to change its lable from its child dialog file. -Ramesh

          O Offline
          O Offline
          Owner drawn
          wrote on last edited by
          #4

          Didn't get you. Be more clear. May be an illustration would do.

          Jesus Loves You and Me :)

          --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

          R 1 Reply Last reply
          0
          • O Owner drawn

            Didn't get you. Be more clear. May be an illustration would do.

            Jesus Loves You and Me :)

            --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

            R Offline
            R Offline
            RamL
            wrote on last edited by
            #5

            I have a Text control on parent dialog box its ID is say IDC_TEXT1 & its Caption is "MY NAME". I want to change its caption from its another child dialog box file. When I click on child TAB page then parent IDC_TEXT1 caption should change to "NEW NAME". Thanks -Ramesh

            O 1 Reply Last reply
            0
            • R RamL

              I have a Text control on parent dialog box its ID is say IDC_TEXT1 & its Caption is "MY NAME". I want to change its caption from its another child dialog box file. When I click on child TAB page then parent IDC_TEXT1 caption should change to "NEW NAME". Thanks -Ramesh

              O Offline
              O Offline
              Owner drawn
              wrote on last edited by
              #6

              ((CYourDialogClass*)GetParent())->GetDlgItem(IDC_TEXT1)->SetWindowText("NEW NAME");

              Jesus Loves You and Me :)

              --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

              R 1 Reply Last reply
              0
              • O Owner drawn

                ((CYourDialogClass*)GetParent())->GetDlgItem(IDC_TEXT1)->SetWindowText("NEW NAME");

                Jesus Loves You and Me :)

                --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

                R Offline
                R Offline
                RamL
                wrote on last edited by
                #7

                Thanks I have already tried that, but Child dialog box file not getting patent Text ID Is it possible to use Notification message from child to parent to change the parent Text property caption. If it is possible, Please let me know.

                1 Reply Last reply
                0
                • R RamL

                  Hi, My query is MFC related to Dialog box. I want to change the Text property label of parent dialog box from its child dialog file. How to change Text lable of parent dialog box from its child dialog file? Thanks in advance -Ramesh.

                  P Offline
                  P Offline
                  Prakash Nadar
                  wrote on last edited by
                  #8

                  Is the child dialog a model dialog or modeless dialog ? If its a modeless, did you pass the the parent window to the modeless dialog ?


                  -Prakash

                  R 1 Reply Last reply
                  0
                  • P Prakash Nadar

                    Is the child dialog a model dialog or modeless dialog ? If its a modeless, did you pass the the parent window to the modeless dialog ?


                    -Prakash

                    R Offline
                    R Offline
                    RamL
                    wrote on last edited by
                    #9

                    It is Modal dialog box. ya, I have passed the parent window to the modeless dialog Thanks -Ramesh

                    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