CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 1999
    Posts
    3

    How to get text of a textbox of another app

    How can i get text of a textbox which belongs to another application????


  2. #2
    Join Date
    Apr 1999
    Location
    Toronto, ON
    Posts
    713

    Re: How to get text of a textbox of another app

    What do you have? It means do you have name of your application the textbox belong to or do you know area on the screen where is the textbox?


    Dmitriy, MCSE

  3. #3
    Join Date
    Jul 1999
    Posts
    535

    Re: How to get text of a textbox of another app

    I would use a pre-translate message to get the HWND of the window using the WindowFromPoint function... that will get the HWND of a window you drag the mouse over.. from there, you can call PostMessage and send a WM_GETTEXT message...
    ex:

    ::PostMessage(hWnd, WM_GETTEXT, strBuffer, NULL)


    If you have any more q's feel free....


  4. #4
    Join Date
    Aug 1999
    Posts
    3

    Re: How to get text of a textbox of another app

    I just have HWND of the textbox


  5. #5
    Join Date
    Jul 1999
    Location
    Israel
    Posts
    1,793

    Re: How to get text of a textbox of another app

    if you have the hwnd of the window try using the
    GetDlgItemText();
    it goes like this:

    GetDlgItemText(Hwnd,IDC_TEXTBOX,szBuffer,intSizeOfBuffer2Copy);let me know if it helpd you ok?




  6. #6
    Join Date
    Jul 1999
    Location
    Israel
    Posts
    1,793

    Re: How to get text of a textbox of another app

    another thing... if you dont have the resource id and i guess youdont.. try using the
    GetWindowText. i never tried it on Dialog items but my guess is that when you have an hwnd of a winodow this function will do..



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured