Board index » delphi » DLL Plugins - object editor forms and property editors

DLL Plugins - object editor forms and property editors

I've got my DLL plugin architecture working now.  Objects can be created
from a stream, even if the app has never seen them before.  Wonderful -
thanks for everyone's help on this one.

Now...

I want to be able to place an editor form in the DLL.  I've heard odd bits
and pieces about having to replace the Application variable in the DLL.
Does anyone have any sample code for this?

I have an interface on the auto-created class factory in the DLL,
IPluginFactory.  This has a  pointer to IApplication on the app.  These
could be used to pass a TApplication, I assume.

Bryan

 

Re:DLL Plugins - object editor forms and property editors


Quote
In article <3b5323be_2@dnews>, Bryan Crotaz wrote:
> I want to be able to place an editor form in the DLL.  I've heard odd bits
> and pieces about having to replace the Application variable in the DLL.
> Does anyone have any sample code for this?

By far the easiest method to get perfect integration of DLL forms is to
build app and DLLs with run-time packages. After that no further code is
required, just create the forms as usual. If you don't package evertything
only modal forms work reasonably well when put in a DLL. For them it is
enough to assign the host apps Application.Handle to the DLLs
Application.handle before you create the modal form. Set the handle back to
0 after the form has been destroyed.

MDI child forms in a DLL require that you save the DLLs Application instance
(e.g. in a Unit Initialization), then replace it with the host apps
Application instance. Undo this in a unit finalization.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

Other Threads