🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2059

Re: Start a Child Application in a Window

#2059
From: Remy Lebeau (TeamB)
Date: Thu, 26 Apr 2007 17:08
34 lines
2315 bytes
"David" <david@pedley.ws> wrote in message
news:46306533$1@newsgroups.borland.com...

> Is it possible to create a new process within (limited to) a given
> window of a running process - like for instance, Adobe Acrobat
> starting up to display a .pdf within Internet Explorer?

Acrobat implements an ActiveX control that IE loads to display pdf
files.  It does not load the main Acrobat application and then
position it inside the IE window.  The ActiveX control handles the
display internally.

> What I am hoping to do is to display files of different types from
an
> archive within the window of a vcl control, using their varying
display
> applications.

Unless those applications implement their own containable ActiveX
controls like Adobe does, then your only option is to start an
application, then manually find its window(s), such as with
EnumWindows() and GetWindowThreadProcessId() (use CreateProcess()
instead of ShellExecute() in order to get the thread and process IDs
of the application), and then use SetParent() to manually set them as
children for your own UI window.

> I have tried ShellExecute with the window parameter set to the
> handle of an existing control but this does not seem to help.

That is not what the hwnd parameter of ShellExecute() is for.


Gambit
Technical Details
Message-ID: <4630dd2e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.251.MISMATCH!news-out.readnews.com!transit4.readnews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46306533$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5166d27047cb5dc0
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46306533$1@newsgroups.borland.com>
Subject: Re: Start a Child Application in a Window
Date: Thu, 26 Apr 2007 10:08:04 -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: 75.82.60.244
Message-ID: <4630dd2e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1177607470 75.82.60.244 (26 Apr 2007 10:11:10 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.251.MISMATCH!news-out.readnews.com!transit4.readnews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail