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. Retriving fields value of UI application

Retriving fields value of UI application

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

    Hi, I have an GUI based windows application which has text box, edit box fields whose values gets updated from time to time. I Need to get the field values of this GUI application using another application and store them in a file on a periodic basis. BTW,I don't have the source code of the GUI application. Can it be done using windows messaging or suggest me a way how to go about doing this.. Thanks,

    T 1 Reply Last reply
    0
    • S Shiva Prasad

      Hi, I have an GUI based windows application which has text box, edit box fields whose values gets updated from time to time. I Need to get the field values of this GUI application using another application and store them in a file on a periodic basis. BTW,I don't have the source code of the GUI application. Can it be done using windows messaging or suggest me a way how to go about doing this.. Thanks,

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      TssPrasad wrote:

      Can it be done using windows messaging or suggest me a way how to go about doing this..

      use FindWindow to Find the Window Handle of the Text Box and using WM_GETTEXT method retrieve the length... Before sending the WM_GETTEXT, send WM_GETTEXTLENGTH to retrieve the length of the Text

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

      S 1 Reply Last reply
      0
      • T ThatsAlok

        TssPrasad wrote:

        Can it be done using windows messaging or suggest me a way how to go about doing this..

        use FindWindow to Find the Window Handle of the Text Box and using WM_GETTEXT method retrieve the length... Before sending the WM_GETTEXT, send WM_GETTEXTLENGTH to retrieve the length of the Text

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

        S Offline
        S Offline
        Shiva Prasad
        wrote on last edited by
        #3

        Thanks alok for the idea.. >>The FindWindow function retrieves a handle to the top-level window whose >>class name and window name match the specified strings what can i do to know the class name & window name... >>WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. if a window has many text edit box, will it copy all the text corresponding to the windows fields?? can you please clarify.

        T D 2 Replies Last reply
        0
        • S Shiva Prasad

          Thanks alok for the idea.. >>The FindWindow function retrieves a handle to the top-level window whose >>class name and window name match the specified strings what can i do to know the class name & window name... >>WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. if a window has many text edit box, will it copy all the text corresponding to the windows fields?? can you please clarify.

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          TssPrasad wrote:

          what can i do to know the class name & window name...

          Window Name is name of the application Window.. from there you have to Enumerate the Child Window using FindWindowEx function (sorry my mistake here). i believe your seond problem solved using Handle return by FindWindowEx!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

          1 Reply Last reply
          0
          • S Shiva Prasad

            Thanks alok for the idea.. >>The FindWindow function retrieves a handle to the top-level window whose >>class name and window name match the specified strings what can i do to know the class name & window name... >>WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. if a window has many text edit box, will it copy all the text corresponding to the windows fields?? can you please clarify.

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

            TssPrasad wrote:

            what can i do to know the class name & window name...

            Use Spy++.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            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