remote handling?

This is a discussion on remote handling? within the C++ Programming forums, part of the General Programming Boards category; hi...i wanna get a handle of a say edit box in this case which is in another app....how do i ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    36

    remote handling?

    hi...i wanna get a handle of a say edit box in this case which is in another app....how do i dothis??

    I have tried the following:

    void EnterText()
    {
    int length;
    length=SendMessage(Edit_Enter,WM_GETTEXTLENGTH,0,0 );
    Text=new char[length];
    SendMessage(Edit_Enter,WM_GETTEXT,(WPARAM)length+1 ,(LPARAM)Text);
    Window_Handle=GetNextWindow(Current_Handle,GW_HWND NEXT);
    if(Window_Handle==NULL)
    MessageBox(NULL,"Noting","sheit",MB_OK);
    else
    MessageBox(NULL,"Handle","Done!",MB_OK);

    if(EnumChildWindows(Window_Handle,EnumFunc,NULL)== 0)
    {
    MessageBox(NULL,"Not good","$$$$",MB_OK);
    }

    }

    BOOL CALLBACK EnumFunc(HWND hwnd,LPARAM lParam)
    {
    MessageBox(NULL,"Handle","Done!",MB_OK);
    if(hwnd==NULL)
    {
    MessageBox(NULL,"No more","That'sit",MB_OK);
    }
    else
    {
    char * Title=NULL;
    int TLength=GetWindowTextLength(hwnd);
    int cp=GetWindowText(hwnd,Title,TLength+1);
    MessageBox(NULL,Title,"hmmm",MB_OK);
    Edit_Handle=FindWindowEx(Window_Handle,NULL,"Edit" ,Title);
    if(Edit_Handle!=NULL)
    SendMessage(Edit_Handle,WM_SETTEXT,(WPARAM)0,(LPAR AM)Text);
    else
    MessageBox(NULL,"Not found yet","nOT YET",MB_OK);
    }
    }

    but the enum function always is 0...help please thnx

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Sorry, I don't have the answer, but just to let you know, this should be on the Windows Board.

    And use code tags. -Look at the top of the board where it says "Posting Code? Read This!"

    I'm sure it's possible to "get to" another program's dialog box... I've done it with a scripting language (WinBatch).
    Last edited by DougDbug; 04-11-2003 at 05:51 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. signal handling and exception handling
    By lehe in forum C++ Programming
    Replies: 2
    Last Post: 06-15-2009, 11:01 PM
  2. Remote debug not working in Visual Studio 2003
    By Bassquake in forum Tech Board
    Replies: 12
    Last Post: 08-22-2008, 01:11 PM
  3. Howto make own application for remote control handling
    By s-men in forum Windows Programming
    Replies: 16
    Last Post: 08-16-2008, 05:22 PM
  4. event handling is serialized in MS Visual Studio C++ 2005 ??
    By mynickmynick in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2008, 05:47 AM
  5. Remote thread problem
    By RubbeR DuckY in forum C++ Programming
    Replies: 6
    Last Post: 08-08-2006, 01:24 PM

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