[lazarus] Win32 menu does not work

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jun 24 11:03:46 EDT 2003


On Tue, 24 Jun 2003 17:16:40 +0200
"Micha Nelissen" <mdvpost at hotmail.com> wrote:

> Mattias Gaertner wrote:
> > On Tue, 24 Jun 2003 11:53:25 +0200
> > "Micha Nelissen" <mdvpost at hotmail.com> wrote:
> >
> >>> TBits is implemented, so you can try it.
> >
> > Please do so.
> >
> 
> Okay, the patch is ready and attached. Half of the first item of the TODO
> can be stripped now (implement menu item ids). It worked with a simple
> menu structure, but we need to test it with lots of menu items to see if
> the TBits are functioning well. We can also try checking whether
> disabling/enabling checking/unchecking works as expected, ie. not call the
> handler when disabled.
> 
> It assumes the FCommand field of TMenuItem has been moved to the public
> section. (See my previous mail). Maybe there is a cleaner solution for
> this.

Eh, I don't know why FCommand is still in the LCL. Probably as we started,
we didn't know, if it is needed for Delphi compatibility. But this is not
the case. The FCommand is a win32 specific thing to identify handles. So, it
should not be stored in the LCL, but in the win32 interface. A Handle must
be enough to identify any interface component.
Maybe the win32 api identifies it otherwise. If this is the case, then the
win32 interface should map the handles. 

I will have a look ...


Mattias






More information about the Lazarus mailing list