Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Host external application window in a form?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Nov 10, 2016 9:15 AM Last Post By: Remy Lebeau (Te...
Dean Clark

Posts: 50
Registered: 6/12/08
Host external application window in a form?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 10, 2016 8:56 AM
In Windows and C++Builder 10.1, is it possible to launch an external application, then make that application's main window a child of the program that launched it? Something akin to changing the Parent property with VCL components? Thanks!
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Host external application window in a form?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 10, 2016 9:15 AM   in response to: Dean Clark in response to: Dean Clark
Dean wrote:

In Windows and C++Builder 10.1, is it possible to launch an external
application, then make that application's main window a child of the
program that launched it?

Technically yes, via the Win32 API SetParent() function, but you shouldn't
do that unless both apps are specifically designed for that purpose:

Is it legal to have a cross-process parent/child or owner/owned window relationship?
https://blogs.msdn.microsoft.com/oldnewthing/20130412-00/?p=4683

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02