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. Accessing an edit box from multiple windows????

Accessing an edit box from multiple windows????

Scheduled Pinned Locked Moved C / C++ / MFC
question
11 Posts 4 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.
  • P pblais

    Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops????? Thanks in advance Pierre

    C Offline
    C Offline
    CPallini
    wrote on last edited by
    #2

    pblais wrote:

    Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops?????

    do you mean hope?! :-D Never heard about Window handles (or CEdit pointers?)? :)

    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

    P 1 Reply Last reply
    0
    • C CPallini

      pblais wrote:

      Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops?????

      do you mean hope?! :-D Never heard about Window handles (or CEdit pointers?)? :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      P Offline
      P Offline
      pblais
      wrote on last edited by
      #3

      nope.... I really meant "hoops" I am fairly new to this and was hoping for an easy way to do this Thanks

      C L 2 Replies Last reply
      0
      • P pblais

        nope.... I really meant "hoops" I am fairly new to this and was hoping for an easy way to do this Thanks

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

        It's not difficult: Have a look at GetDlgItem, either the MFC flavour or the WINAPI one, depending upon your tastes. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        P 1 Reply Last reply
        0
        • P pblais

          nope.... I really meant "hoops" I am fairly new to this and was hoping for an easy way to do this Thanks

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #5

          pblais wrote:

          and was hoping for an easy way to do this

          Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it. or you could get the book "Learn C++ in 21 days"

          P 1 Reply Last reply
          0
          • P pblais

            Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops????? Thanks in advance Pierre

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

            If you have a handle to main window,yes.


            WhiteSky


            P 1 Reply Last reply
            0
            • H Hamid Taebi

              If you have a handle to main window,yes.


              WhiteSky


              P Offline
              P Offline
              pblais
              wrote on last edited by
              #7

              Thank you very much

              H 1 Reply Last reply
              0
              • C CPallini

                It's not difficult: Have a look at GetDlgItem, either the MFC flavour or the WINAPI one, depending upon your tastes. :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

                P Offline
                P Offline
                pblais
                wrote on last edited by
                #8

                Thank you very much

                1 Reply Last reply
                0
                • L led mike

                  pblais wrote:

                  and was hoping for an easy way to do this

                  Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it. or you could get the book "Learn C++ in 21 days"

                  P Offline
                  P Offline
                  pblais
                  wrote on last edited by
                  #9

                  led mike wrote:

                  Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it. or you could get the book "Learn C++ in 21 days"

                  I forgot to mention that I have been successfully writing and testing MFC Dialog type applications for quite a few years now, many with child windows. I have never had a reason for a child window to access any controls from any other windows so it never was an issue. Recently, that situation presented itself. To save time exploring how to do this, I posted here. My mother always said "if you can't say something nice, don't say anything at all". So please keep your condescending attitude to yourself Mike:mad:

                  L 1 Reply Last reply
                  0
                  • P pblais

                    Thank you very much

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

                    You're welcome.:-D


                    WhiteSky


                    1 Reply Last reply
                    0
                    • P pblais

                      led mike wrote:

                      Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it. or you could get the book "Learn C++ in 21 days"

                      I forgot to mention that I have been successfully writing and testing MFC Dialog type applications for quite a few years now, many with child windows. I have never had a reason for a child window to access any controls from any other windows so it never was an issue. Recently, that situation presented itself. To save time exploring how to do this, I posted here. My mother always said "if you can't say something nice, don't say anything at all". So please keep your condescending attitude to yourself Mike:mad:

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #11

                      pblais wrote:

                      I have been successfully writing and testing MFC Dialog type applications for quite a few years now

                      I'm impressed.... no really I am

                      pblais wrote:

                      I have never had a reason for a child window to access any controls from any other windows

                      Yeah, attitude aside, you don't want to. See the Mode-View-Controller Design Pattern[^] I figured, just because your mad, that's no excuse to develop lousy software.

                      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