Article View: borland.public.cppbuilder.nativeapi
Article #6047Re: Opening up Web Browsers inside my App
From: Gav
Date: Mon, 13 Jun 2005 09:37
Date: Mon, 13 Jun 2005 09:37
62 lines
3140 bytes
3140 bytes
Ok,
So thinking of a different approach then,
would it be a satisfactory solution to :-
1. Open the Window using the SW_HIDE properties.
2. Grab the Window Title
3. Put it into my form using ??
or is there a better way.
My last question on the matter, as I'm sure your all bored by now :)
Gav...
> I have done what I think to be right here, sorry to be harping on
> about it, but can you tell me why in my case it does not work
> using the code below seems to me to be right for what you say
> and from other sources.
>
>
>> void __fast TMDIChild1::ITimageClick(TObject *Sender)
>> {
>> char DefaultBrowser[MAX_PATH+1] = {0};
>> MDIChild2->GetDefaultBrowser(DefaultBrowser);
>>
>> STARTUPINFO si = {sizeof(STARTUPINFO), 0};
>> PROCESS_INFORMATION pi = {0};
>>
>> AnsiString CmdLine = (AnsiQuotedStr(DefaultBrowser, '"') + " " +
>> AnsiQuotedStr("http://www.minitutorials.com", '"'));
>>
>> if( ::CreateProcess(NULL, CmdLine.c_str(), NULL, NULL, FALSE, 0,
>> NULL, NULL, &si, &pi) )
>> {
>> WaitForInputIdle(pi.hProcess, INFINITE);
>> ::CloseHandle(pi.hThread);
>> ::CloseHandle(pi.hProcess);
>> MyInfo info = {pi.dwProcessId, NULL};
>>
>> ::EnumWindows((WNDENUMPROC)FindBrowser,reinterpret_cast<LPARAM>(&info));
>>
>> if( info.hWnd != NULL )
>> {
>> ::SetParent ( info.hWnd, Form4->Handle );
>> Form4->Show();
>> }
>>
>> }
>>
>> }
>
> Am I using SetParent correctly or not?
> Is the correct handle being passed into info?
>
> Thanks
>
> Gav...
>
Technical Details
Message-ID:
<42ad53e1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<422926aa$1@newsgroups.borland.com> <422c31bd$1@newsgroups.borland.com> <422c515c@newsgroups.borland.com> <422c5d8e$1@newsgroups.borland.com> <42a2f6aa$1@newsgroups.borland.com> <42a3910a$1@newsgroups.borland.com> <42a44aa2$1@newsgroups.borland.com> <42a4855c$1@newsgroups.borland.com> <42a588ed@newsgroups.borland.com> <42a5a49d@newsgroups.borland.com> <42a5bb59$1@newsgroups.borland.com> <42a5bdbf@newsgroups.borland.com> <42a5d4dd@newsgroups.borland.com> <42a62b57@newsgroups.borland.com> <42a63c20$1@newsgroups.borland.com> <42a6e629$1@newsgroups.borland.com> <42aab0bd@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,91b603800ded4d32 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Gav" <brightoncomputers@brightontown.com.au> Newsgroups: borland.public.cppbuilder.nativeapi References: <422926aa$1@newsgroups.borland.com> <422c31bd$1@newsgroups.borland.com> <422c515c@newsgroups.borland.com> <422c5d8e$1@newsgroups.borland.com> <42a2f6aa$1@newsgroups.borland.com> <42a3910a$1@newsgroups.borland.com> <42a44aa2$1@newsgroups.borland.com> <42a4855c$1@newsgroups.borland.com> <42a588ed@newsgroups.borland.com> <42a5a49d@newsgroups.borland.com> <42a5bb59$1@newsgroups.borland.com> <42a5bdbf@newsgroups.borland.com> <42a5d4dd@newsgroups.borland.com> <42a62b57@newsgroups.borland.com> <42a63c20$1@newsgroups.borland.com> <42a6e629$1@newsgroups.borland.com> <42aab0bd@newsgroups.borland.com> Subject: Re: Opening up Web Browsers inside my App Date: Mon, 13 Jun 2005 17:37:40 +0800 Lines: 64 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 203.121.204.130 Message-ID: <42ad53e1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118655457 203.121.204.130 (13 Jun 2005 02:37:37 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail