Article View: borland.public.cppbuilder.nativeapi
Article #15740Re: Exporting a form from a DLL and docking it to main application
From: Mark Guerrieri
Date: Wed, 18 Jun 2003 05:38
Date: Wed, 18 Jun 2003 05:38
33 lines
2322 bytes
2322 bytes
The problem is that each loaded dll gets its own copy of the VCL, complete with its own Application object. The prefered solution is to store forms in dynamicly loaded packages. The workaround is to: 1- Store the dll Application variable of dll load 2- Have the main app pass its Application variable to the dll and assign this to dll Application 3- Create forms to export with Application as parent 4- Delete all forms and restore original dll Application on dll unload. Again, using packages is much easier. Mark "Pang Fu" <pangfu@hotmail.com> wrote in message news:3eefc75e@newsgroups.borland.com... > (Sorry, I'm not sure which news group is the best for this topic) > > In BCB, I want to > (1) Build a DLL which exports a form > (2) And use this DLL dynamicly (not by linking the *.lib file) in my > main application to create single (or multiple) instances of the form in DLL > (3) And (it seems to that this is the problem step) dock this > dynamically created form onto a panel in the main application. > > Is there any one who could give an example how to do these steps? > > Pang Fu > pangfu@hotmail.com > > >
Technical Details
Message-ID:
<3eeffab0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3eefc75e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1ca8973c81239c4b X-Google-Attributes: gid10cc67,public X-Google-Thread: 102541,1ca8973c81239c4b X-Google-Attributes: gid102541,public X-Google-ArrivalTime: 2003-06-17 22:39:45 PST From: "Mark Guerrieri" <markg11@comcast.net> Newsgroups: borland.public.cppbuilder.nativeapi,borland.public.cppbuilder.students References: <3eefc75e@newsgroups.borland.com> Subject: Re: Exporting a form from a DLL and docking it to main application Date: Wed, 18 Jun 2003 01:38:00 -0400 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 68.44.202.58 Message-ID: <3eeffab0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1055914672 68.44.202.58 (17 Jun 2003 22:37:52 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail