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
>> 02/22/00 05:09AM >>>
Show quoted text 14 lines
-----Original Message-----
From: Shane Miller
Sent: Monday, February 21, 2000 09:04 PM
To:
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 with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus