Copying info from forms - Programmer

This is a discussion on Copying info from forms - Programmer ; I want to copy info from one application to another. Is there a util or example program which shows you how to do this? For example, Spy++ shows you how what mouse events where sent to which dialog. I want ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Copying info from forms

  1. Copying info from forms

    I want to copy info from one application to another. Is there a util
    or example program which shows you how to do this? For example, Spy++
    shows you how what mouse events where sent to which dialog. I want to
    build one application which will copy data entered into one dialog in a
    foreign application (one over which I have no control) and put it into
    another one? Basically, I am trying to build an app like Gator, so
    that I don't have to reentry data, just copy it from one dialog to
    another!
    Thanks,
    Deodiaus


  2. Re: Copying info from forms

    Deodiaus wrote:

    > I want to copy info from one application to another. Is there a util
    > or example program which shows you how to do this? For example, Spy++
    > shows you how what mouse events where sent to which dialog. I want to
    > build one application which will copy data entered into one dialog in a
    > foreign application (one over which I have no control) and put it into
    > another one? Basically, I am trying to build an app like Gator, so
    > that I don't have to reentry data, just copy it from one dialog to
    > another!
    > Thanks,
    > Deodiaus
    >


    This can be done with data from edit controls, but not with much else.

    The HWND of an edit control in a foreign app can be found by first using
    Spy++ to get the control's ID, then using FindWindow, FindWindowEx,
    EnumChildWindows and the like to locate an edit control with the proper
    parent and ID.

    With the edit control's HWND you can SendMessage(hwnd, WM_GETTEXT,...)
    to grab the text in the control, even though it is in a different process.

    --
    Scott McPhillips [VC++ MVP]


+ Reply to Thread