[Lazarus] LCL and DLLs, initializing the widget set safely?

Massimo Fazzolari reinhardt1053 at gmail.com
Wed Dec 9 01:56:48 CET 2009


It sound great! I really need to use LCL with DLL!

2009/12/9 Phil Hess <macpgmr at fastermac.net>

> What widgetset are you testing? Calling Application.Initialize never worked
> before on Windows.
>
> On Carbon, an LCL form in a .dylib was working as long as a year ago, but
> Windows would freeze when the DLL form is displayed.
>
> Thanks.
>
> -Phil
>
> ----- "Marco Alvarado" <cronodragon at gmail.com> wrote:
>
> > I'm really happy to inform that I solved the bug, and now I have a
> > working version of LCL 0.9.28.2 in DLL. It seems the fix might not be
> > difficult for someone who understands the LCL's internals. I'll
> > explain what I did hoping someone could work on it.
> >
> > Somehow an instance of TApplication is being created in DLL, but it's
> > not being initialized like in .EXE. One just needs to initialize the
> > widgetset by calling Application.Initialize(). That solves the
> > exception when creating forms.
> >
> > The other bug I got was related to TWinControl.CreateParented().
> > Replaced it by TForm.Create(nil) and Windows.SetParent(), and now
> > everything is fine.
> >
> > Also I'm creating the components dinamically after initializing the
> > Application. I'll test designing forms later.
> >
> > Best regards!
> > -Marco
> >
> > --
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lists.lazarus.freepascal.org
> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20091209/1ecb2d01/attachment-0004.html>


More information about the Lazarus mailing list