[lazarus] CVS update

Shane Miller SMiller1 at stvgb.org
Tue Feb 22 08:43:14 EST 2000


I agree with you and that's what I did.  If gettext is called, I check HANDLEALLOCATED.  IF True, then I call the SendMEssage.  If false, then I use FCaption.
Shane

>>> sam at campbellsci.co.uk 02/22/00 05:09AM >>>


> -----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

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list