[Lazarus] Form in DLL

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu May 3 15:16:30 CEST 2012

Michael Schnell wrote:
> On 05/03/2012 01:40 PM, Mark Morgan Lloyd wrote:
> So you want to get along with a single thread, but want to define the 
> Form in the DLL ?

No, I want to control a preexisting form from a DLL: tell it what menu 
structure to display etc., even if that meant that they were built up 
step-by-step under code control rather than constructed from a 
description in resources.

In the limiting case a- plugin, for want of a better description- adds a 
single item to a context-sensitive menu, and provides the functionality 
to implement that item.

> I don't think that this is possible using the LCL in the DLL. But it 
> should be possible to pass the resources, stored the DLL, that are used 
> to construct the form and it's content to the main program and have the 
> LCL of same construct the (now non-main) form. But as finally the 
> appropriate GUI events will need to call functions in the DLL, I suppose 
> using a combined memory management is absolutely necessary.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the Lazarus mailing list