Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

TToolButton and TMenuItem (Was: Re: Win32 and TToolButton)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Keith Bowes
Show quoted text 25 lines
From: "Markus L�din" 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 world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com

Reply by email