[Lazarus] Hint about CreateWnd

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Mar 1 16:21:42 CET 2008


On Sat, 1 Mar 2008 15:59:13 +0100
zeljko <zeljko at holobit.net> wrote:

> On Saturday 01 March 2008 15:44, zeljko wrote:
> > On Saturday 01 March 2008 14:52, Mattias Gaertner wrote:
> > > Replace
> > >   DoSomeOperationWith(Handle)
> > > with
> > >   DoSomeOperationThatNeedsAHandle;
> > >
> > > For example any Canvas operation needs a handle.
> >
> > tnx, I've found Loaded() satisfies my needs - for runtime, but
> > Loaded() isnt' called during design time ? so ... what to call
> > here ?
> 
> error ! it is called during design time, but not first time when I
> drop new control on to form (i can see my control, but without
> default settings - it's empty) - I've fixed this by overriding
> UpdateShowing, and calling defaults when HandleAllocated.

Maybe what you search a method, when your control got a Handle?
It's CreateWnd. Override that.


Mattias



More information about the Lazarus mailing list