[lazarus] Progressbar control fix

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jun 25 16:37:13 EDT 2003


On Wed, 25 Jun 2003 20:36:54 +0200
"Micha Nelissen" <mdvpost at hotmail.com> wrote:

> Hi,
> 
> Continuing with the progressbar example till it works :).
> 
> Attached is a fix to correctly set the min and max position, and some code
> to specify the correct flags when the control is created (smooth, vertical
> style).

Applied.

 
> The 'Smooth' property does not work yet, it needs to be set when the
> control is created. Apparantly, you cannot set it later on, using
> SetWindowLong, as the code now tries to. Can a window recreate be forced
> within handling the LM_SETPROPERTIES message handler?

Hmm. As far as I can see, LM_SETPROPERTIES is only called in ApplyChanges,
and this is now only called after Loading, on initializing the window and on
property change.
So, yes, you can recreate the Handle. But make sure, you only do it, when
properties has really changed. Otherwise InitializeWnd will loop.


Mattias






More information about the Lazarus mailing list