Extracting Data From Another Program

This is a discussion on Extracting Data From Another Program within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I know this has been covered slightly before, but i need to make a program that gets my current ...

  1. #1
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339

    Red face Extracting Data From Another Program

    Hey,

    I know this has been covered slightly before, but i need to make a program that gets my current CPU temp out of another program and checks to see wearther its to hight or to low. My current program just tells you what it is, its format is like this.

    Current CPU Temp: 36

    36 being in an edit control. There are alot of other edits like system temp and stuff but i only need to get the data out the CPU temp edit box into a varible into my program.

    I know how to get a handle to the main program with the edit as a child control, using FindWindow().

    What i need to know however is how to get a handle to the edit control containing the cpu data, this is the child control within the second program.

    Thanks for any help,
    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

  2. #2
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Dunno, but it might be easier to figure out how the program gets the CPU temp and use that?

  3. #3
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    it's pretty much impossible...there might be a way, though...give me some time to think about this, I think you may be able to using MS's Spy++
    Last edited by -KEN-; 02-11-2002 at 06:16 PM.

  4. #4
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    Hey,

    I worked it out!! lol.

    This is the function:

    ChildWindowFromPoint();

    You gotta use findwindow first to get a handle to the parent, then, u gotta take a screen shot of the prog, and find the client cords of part of the controls handle you want. And bingo it should return a handle lol.

    I also worked out that you can use this function with WM_MOUSEMOVE, it will find out which control the mouse is over, hence allowing mouse over effects

    I been looking for this for a while.

    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking data into program
    By Kennedy in forum C Programming
    Replies: 7
    Last Post: 04-25-2007, 01:02 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  3. Replies: 26
    Last Post: 06-15-2005, 03:38 PM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 07:49 PM

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