Thread: Reading text in another app

  1. #1

    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
    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

    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

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, 05: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-25-2004, 11:14 PM
  4. Reading Text files
    By AmazingRando in forum C++ Programming
    Replies: 1
    Last Post: 09-07-2003, 08:30 PM
  5. Reading Tab Separted Text files
    By Cathy in forum C Programming
    Replies: 1
    Last Post: 02-15-2002, 10:28 AM