Re: getId() does not return ids of popup menu entries

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'm thinking of implementing a w32HMenuSelect event in the next
version. It goes something like this ...

-------w32HMenuSelect ------------------------
The event handler parameters are 
   {ItemId, ParentID, Flags, wParam, lParam}

This event is triggered when the application receives a 
WM_MENUSELECT message from Windows. These are received 
when the user selects a menu or menuitem before clicking it.

** ItemId, if greater than zero, is the Win32lib ID of the menu
   or menuitem selected. A value of 0 means that the menu has been
   closed. Values less than zero are the negative value of the
   Windows predefined menu item ids of the System Menu items, 
   except that -1 is used for the System Menu itself.

** ParentId. If 'ItemId' is a win32lib id, this is the win32lib
   id of its parent control. If 'ItemId' is zero, this is the 
   item id of the last one we received a message for, which is
   -1 if it was the system menu that closed. If 'ItemId' is 
   a System Menu item, this is the menu text for that item.

** Flags. Can be a combination of ...
 - MF_BITMAP Item displays a bitmap.
 - MF_CHECKED Item is checked.
 - MF_DISABLED Item is disabled.
 - MF_GRAYED Item is grayed.
 - MF_HILITE Item is highlighted.
 - MF_MOUSESELECT Item is selected with the mouse.
 - MF_OWNERDRAW Item is an owner-drawn item.
 - MF_POPUP Item opens a drop-down menu or submenu.
 - MF_SYSMENU Item is contained in the window menu. The lParam 
   parameter contains a handle to the menu associated with the
   message.

** wParam and lParam are the raw data items passed by the 
   Windows WM_MENUSELECT message.

This event is only triggered for a Window that has a menu attached.
-------------------------------------------------

All comments and suggestions welcome.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu