modify menu item state

hi

in my application i have created menu using code.

i want to modify the state of one of the menu item from NORMAL to DIM. As
i have created all menu and its menu items through code i have widget
address of the same.

For changing menu item state ApModifyItemState () function is used. but
this function requires menu item number i.e. ABN_MenuButton.

their are no names to any widgets created at the runtime.

now, how to give names to menu items created at runtime. so we can use them
in ApModifyItemState () function.

or, how to modify the menu item state from NORMAL to DIM and vice versa
for the menu created from code at runtime.

thanks in advance

sameer

sam <seto@vsnl.com> wrote:
: hi

: in my application i have created menu using code.

: i want to modify the state of one of the menu item from NORMAL to DIM. As
: i have created all menu and its menu items through code i have widget
: address of the same.

: For changing menu item state ApModifyItemState () function is used. but
: this function requires menu item number i.e. ABN_MenuButton.

: their are no names to any widgets created at the runtime.

: now, how to give names to menu items created at runtime. so we can use them
: in ApModifyItemState () function.

: or, how to modify the menu item state from NORMAL to DIM and vice versa
: for the menu created from code at runtime.

If you’re using the PtMenu widget directly, you can’t use ApModifyItemState()
on it because the Ap* functions are only for PhAB menu modules.

If you’re creating a PtMenu with a bunch of PtMenuButton widgets as children,
I expect you have to set Pt_BLOCKED and Pt_GHOST in the PtMenuButton’s
Pt_ARG_FLAGS to dim the item, and clear those bits to return the item to
normal.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

hi Steve Reid,

thank you for your support and quick response.

sameer