TToolButton and TMenuItem (Was: Re: [lazarus] Win32 and TToolButton)
Keith Bowes
keith_bowes at hotmail.com
Wed Sep 4 00:36:46 EDT 2002
>From: "Markus Lüdin"<markus at luedin.com>
>
>I tried to make the Win32 ToolBar work and the problem I found is the
>following:
>
>When you try to create a TToolButton it fails and keeps trying until it
>freezes.
>
>That happens because under Windows you don't get a Handle for a ToolButton
>but
>the
>LCL ToolButton is inherited from TWinControl and because of that it keeps
>trying
>
>to create the ToolButton because the Handle is 0...
>
>So either we change the LCL ToolButton and ToolBar so that the ToolButtons
>are
>not
>accesed by a handle (i.e. not inherited by TWinControl) but by the Index
>number
>or the command....or we have to try to make hack where we place a regular
>button
>on the ToolBar, if that is possible.
>
Cool, I'm glad you figured that out. I could never figure out what caused
the endless loop. The same thing happened with TMenuItem; you can check the
hacky, subadequate way I create menus in the TWin32Object.CreateComponent
method.
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the Lazarus
mailing list