Article View: borland.public.cppbuilder.internet.socket
Article #3994Re: sending RichEdit text into a website textbox
From: Remy Lebeau (TeamB)
Date: Fri, 22 Apr 2005 21:33
Date: Fri, 22 Apr 2005 21:33
34 lines
2528 bytes
2528 bytes
"MrIBM" <GaRbrs6@aol.com> wrote in message news:42695bfa@newsgroups.borland.com... > I'm writing an application where I'm using a TRichEdit. The text > that I type into the RichEdit I want to send to the web browser > whether it be Netscape, Explorer, America Online, Netzero, or > some other, into an textbox of an website. Does anyone know > which components I need to do that, and which instructions I > need to accomplish that? Only IE directly supports what you are asking for. The other browsers don't support Automation. You can programmably connect to the IWebBrowser2 interface of a running instance of IE and use its DOM interfaces, such as IHTMLDocument2 and IHTMLEditElement, to programmably manipulate pages that are loaded in the browser. Opera does expose normal Edit and ComboBox controls, but you will have to use the Win32 API to get to them. There is an MDI client window within Opera's main window that hosts each browser window, which in turn contains a child window of class name "ContentWindow", which in turn contains a child window of class "FRAMES2" for each frame on a site. "FRAMES2" contains the content of a single HTML page, including any edit fields, buttons, etc. Given an HWND for Opera's main window, you can then use the Win32 API, such as via the FindWindow/Ex() function, to drill down the layers to the particular control that you want to manipulate and use the WM_SETTTEXT message to change its content. Netscape, as of v7.x anyway, does not provide any such access at all. I don't have AOL, Netzero, or Firefox, so I can't tell you how they operate. Gambit
Technical Details
Message-ID:
<42696d1e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42695bfa@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9970d2b741235bde X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <42695bfa@newsgroups.borland.com> Subject: Re: sending RichEdit text into a website textbox Date: Fri, 22 Apr 2005 14:33:25 -0700 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42696d1e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114205470 68.69.17.41 (22 Apr 2005 14:31:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail