how to get the widget

hi,all:
i am a new user under qnx4.25.I have a problem as following:
I create a button widget when the program is running. I defined a menu
event with this widget.How can I get the widget of the button after popping
up the menu from the callback of the menu item.

Thank you for your help.