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. C / C++ / MFC
  3. Howto get text from editbox of another application?

Howto get text from editbox of another application?

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

    pliz help me... i want to get the text string from the focused editbox of focused application... how can i do it?

    C S 2 Replies Last reply
    0
    • G Goa

      pliz help me... i want to get the text string from the focused editbox of focused application... how can i do it?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      GetWindowText ? I believe if you have the HWND of the app, you can get the HWND of the focused control. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

      Sonork ID 100.10002:MeanManOz

      I live in Bob's HungOut now

      G 1 Reply Last reply
      0
      • C Christian Graus

        GetWindowText ? I believe if you have the HWND of the app, you can get the HWND of the focused control. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

        Sonork ID 100.10002:MeanManOz

        I live in Bob's HungOut now

        G Offline
        G Offline
        Goa
        wrote on last edited by
        #3

        ye, i have the HWND of the app... but now how can i get HWND of the control?

        C 1 Reply Last reply
        0
        • G Goa

          ye, i have the HWND of the app... but now how can i get HWND of the control?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          It it has the focus, you can call GetFocus, I presume this will return the control that has the focus, not the parent window. You don't even need the windows HWND. If I'm wrong, you can iterate looking for the control with focus with GetNextDlgTabItem. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

          Sonork ID 100.10002:MeanManOz

          I live in Bob's HungOut now

          G 1 Reply Last reply
          0
          • G Goa

            pliz help me... i want to get the text string from the focused editbox of focused application... how can i do it?

            S Offline
            S Offline
            Sito Dekker
            wrote on last edited by
            #5

            See also this MSDN article by Paul DiLascia.

            1 Reply Last reply
            0
            • C Christian Graus

              It it has the focus, you can call GetFocus, I presume this will return the control that has the focus, not the parent window. You don't even need the windows HWND. If I'm wrong, you can iterate looking for the control with focus with GetNextDlgTabItem. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

              Sonork ID 100.10002:MeanManOz

              I live in Bob's HungOut now

              G Offline
              G Offline
              Goa
              wrote on last edited by
              #6

              you are wrong... but... i have found the function that enums all child windows of the the parent window... BUT! i dont know how to find out whether it has focus or not :(

              E R 2 Replies Last reply
              0
              • G Goa

                you are wrong... but... i have found the function that enums all child windows of the the parent window... BUT! i dont know how to find out whether it has focus or not :(

                E Offline
                E Offline
                Ernest Laurentin
                wrote on last edited by
                #7

                call: HWND GetFocus() or static CWnd* PASCAL GetFocus() in MFC

                1 Reply Last reply
                0
                • G Goa

                  you are wrong... but... i have found the function that enums all child windows of the the parent window... BUT! i dont know how to find out whether it has focus or not :(

                  R Offline
                  R Offline
                  Ravi Bhavnani
                  wrote on last edited by
                  #8

                  Use CWnd::GetForegroundWindow() to get the top-level CWnd that currently has focus. Then, iterate through its child windows as mentioned earlier. /ravi "There is always one more bug..." ravib@ravib.com http://www.ravib.com

                  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