[lazarus] CVS update

Samuel Liddicott sam at campbellsci.co.uk
Tue Feb 22 06:09:45 EST 2000




> -----Original Message-----
> From: Shane Miller [mailto:SMiller1 at stvgb.org]
> Sent: Monday, February 21, 2000 09:04 PM
> To: lazarus at miraclec.com
> Subject: Re: [lazarus] CVS update
>
>
> Hello,
> I just updated CVS.
>
> I fixed a bug in GetCaption for csEdit.  When a csEdit is
> created, the caption is checked for it.  In GetCaption a
> LM_GetText is called, but the widget hasn't been created yet.
>  I added a line to check HandleAllocated first for csEdit.

Just curious; csEdit should be able to maintain a caption quite successfully
before the handle has been created.  The GetCaption should always check
HandleAllocated, if false return the internal caption, otherwise it should
use LM_GetText.

When the handle is created (CreateWnd) the caption should be set from the
internal caption.

When the handle is destroyed with DestroyWnd the LM_GetText caption should
be copied back to the internal caption ready for access via GetText and
restoration when CreateWnd is next called.

Similarly, SetCaption should update either the internal copy, or the
LM_SetText way depending on the existance of a handle.

Sam






More information about the Lazarus mailing list