Reading text in another app

This is a discussion on Reading text in another app within the C++ Programming forums, part of the General Programming Boards category; I have been playing with the SendMessage to interact with another app. I need to know how to read text ...

  1. #1
    Unregistered
    Guest

    Question Reading text in another app

    I have been playing with the SendMessage to interact with another app. I need to know how to read text from another app.

    This app has a window with a log that I need to parse. It does not put the log to a file. If it went to a file I could just parse the file, but I can see no way to get the text from the window.

    I have a FindWindow derived pointer to the window, but none of the CWnd funtions seem to help. Also, I watch the window with Spy++ and I see no events when the text updates.

    Any ideas?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I wonder about your intentions on this one......

    But anyway....

    Look up WM_GETTEXTLENGTH to get the amount of text in the window then create a buffer and use it with WM_GETTEXT.....

    Not exactly rocket science....but fun all the same

  3. #3
    Unregistered
    Guest

    Talking Honorable intentions

    I will take a look at your suggestions.

    I am writing a program to play cards. I needed to push buttons to take appropriate actions. I need to read the text because the information of what cards are delt is stored in the text. I was not trying to be secretive.

  4. #4
    Unregistered
    Guest

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading text files on the internet
    By Mavix in forum C# Programming
    Replies: 8
    Last Post: 06-20-2007, 06:38 AM
  2. Reading text file and structuring it..
    By Killroy in forum C Programming
    Replies: 20
    Last Post: 11-19-2004, 08:36 AM
  3. STATIC text label or LABEL in Windows APP - NO MFC!
    By triste in forum Windows Programming
    Replies: 5
    Last Post: 10-26-2004, 12:14 AM
  4. Reading Text files
    By AmazingRando in forum C++ Programming
    Replies: 1
    Last Post: 09-07-2003, 09:30 PM
  5. Reading Tab Separted Text files
    By Cathy in forum C Programming
    Replies: 1
    Last Post: 02-15-2002, 10:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21