Zhou,
You might do better to create a menu in PB and then set your parent menu to
point to it.
In the function below, every submenu on am_append is appended to am_main
global function integer ta_f_appendmenutomenu (menu am_main, menu
am_append);
////////////////////////////////////////////////////////////////////////////
//
//
// Function: ta_f_AppendMenuToMenu
//
// Access: Public
//
// Arguments:
// am_main Existing menu that will be appended to
// am_append Menu to append to the existing menu
//
// Returns: Integer
// 1 = Success
// -1 = Failure
//
// Description: Appends a menu to the end of another menu.
//
////////////////////////////////////////////////////////////////////////////
//
constant integer SUCCESS = 1
constant integer FAILURE = -1
long ll_lastitem, ll_count, ll_index
// Check arguments
IF Not IsValid(am_main) or Not IsValid(am_append) THEN
Return FAILURE
End IF
// Add each item from the append menu to the end of the main menu
ll_lastitem = UpperBound(am_main.item[1].item)
ll_count = UpperBound(am_append.item)
FOR ll_index = 1 TO ll_count
am_main.item[1].item[ll_lastitem + ll_index] =
am_append.item[ll_index]
NEXT
Return SUCCESS
end function
> ----------
> From: Bridge[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, December 10, 1999 11:00 AM
> To: [EMAIL PROTECTED]
> Subject: PFCSIG how to user pbm_command event
>
> Dear all,
> i use API function to append a menu item to a menu,
> but how can i accept the event when user select the appended menu item.
> i create the user-event command mapped to pbm_command.
> but when i selected the menu, it seemed that the user-event: command
> accept such action.
> my question is:
> how can i accept the appended menu item 's select event
>
> [EMAIL PROTECTED]
>
> > [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS,
> ADDRESS
> > A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help
> pfcsig
> > SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
>
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]