[lazarus] Q: CreateWnd, CreateHandle, HandleNeeded: which to override
Stefan Hille
stoppok at osibisa.ms.sub.org
Tue Dec 28 19:58:11 EST 1999
Hi!
On Mon, Dec 27, 1999 at 12:14:58AM +0100, Marc Weustink wrote:
> At 10:33 26-12-99 +0100, you wrote:
> >Hi,
> >
> >I just started to update TTrackbar & TProgressbar to the new interface
>
> Great
>
I just committed my changes and both components (and examples) are working
again.
I'm not absolutely sure if everything went right with my commit, so it'd be
nice if somebody could check it. Specially I'm not sure if everything is OK
with gtkobject.inc because I had to resolve a conflict there.
> [..InitializeWnd and/or AttachSignals...]
Thanks for your explanation. I now derived both of them for TTrackBar and
TProgressbar.
> InitializeWnd: (Shouldn't be used it but I'll describe the initial idea)
> The control caches values as long as no visual component is needed. For
> instance to set the value of a trackbar, you dont need the visual part. The
> code in InitializeWnd gets called after the component is created. Here you
> can code to initialize to newly created component. On second toughts this
> routine shouldn't be needed. The routine (your create routine in gtkobject)
> which creates the visual part should take care of this.
My approach is now to only create the basic object during the Create without
caring too much about the current object properties. In the InitializeWnd
proc I'll then send another message to the interface (e.g. LM_ChangeTrackbar)
and the interface will then set the current object properties. This seems
useful to me, because the component-properties may be changed during
program flow which would require recreation of the visual component if
I would set everything during create.
> I hope this clears most of your questions, if still unclear you can allways
> ask.
Tahnks again.
bye,
Stefan
--
---------------------------------------------------------
Stefan Hille email: stoppok at osibisa.ms.sub.org
48155 Muenster voice: 0251/664695
More information about the Lazarus
mailing list