[lazarus] Enable/CheckMenuItem

Marc Weustink marc at dommelstein.net
Sat Nov 22 06:29:30 EST 2003


At 09:04 22-11-2003, Micha Nelissen wrote:
>Marc Weustink wrote:
>
>>At 22:23 21-11-2003, Micha wrote:
>>
>>>Specification of Enable/CheckMenuItem needs to be more specific. Due 
>>>to  win32api obscurities it needs to be changed: note that only hndMenu 
>>>changed:
>>>
>>>hndMenu: specifies _parent_ of menuitem to change
>>
>>??? Doesn't the win32 interface keep track of that (or can't it be quiried) ?
>
>(1) No. (2) It can't be, there is no GetParentMenu(handle) call or 
>something like that.

I should have read before asking :)

Your original message:
>Specification of Enable/CheckMenuItem needs to be more specific. Due 
>to  win32api obscurities it needs to be changed: note that only hndMenu 
>changed:
>
>hndMenu: specifies _parent_ of menuitem to change
>uIDEnableItem: Integer - menu item to check/uncheck
>bChecked: Boolean      - new state of the menu item


Ehm, now I understand your question. The GTK winapi implementation of 
CheckMenuItem is wrong. It uses hndMenu as the item to check and ignores 
uIDEnableItem. But it should use hndMenu as menu and uIDEnableItem as 
"command or index" to the Item.

I think I missed it, I'll look at it.

Marc






More information about the Lazarus mailing list