[lazarus] Win32 menu does not work
Marc Weustink
marc.weustink at cuperus.nl
Tue Jun 24 11:51:33 EDT 2003
+ From: Micha Nelissen [mailto:mdvpost at hotmail.com]
+ Sent: dinsdag 24 juni 2003 18:03
+
+ Michael Van Canneyt wrote:
+ > On Tue, 24 Jun 2003, Mattias Gaertner wrote:
+ >
+ >>
+ >> 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 ...
+ >
+ > Win32 has a handle per menu item, but the *command* associated with
+ > the menu can be shared between menu items, so this needs to be stored
+ > with the
+
+ I don't know how useful it would be to have two menu items firing the same
+ event... :).
Hmm.. a bit digging in my memory, from the time I was programming win 3.11
API...
I think the M$ idea behind it was a bit the same as Delphi does with
actions.
You could associate a commandID to buttons, toolbuttons, menuitems and popup
menus, and implement the command at one place. Specially for popmenus and
shared MDI menus you must be able to assign the same command. (Popmenus were
hidden menuitems)
I think nowadays you don't need it.
Marc
More information about the Lazarus
mailing list