Examples: AddCommandToMenu()


The following example is a portion of the IG_CreateMenuItems procedure in the sample integrating application. It uses the AddCommandToMenu() function to add a separator and the IG_Lead_Maintenance command to the CL_Sales_Cards command list (submenu).

{Add a separator, which is a built-in command}
Seq = 0;
Status = AddCommandToMenu(DYNAMICS, 
	resourceid(form Command_Sales),
	resourceid(command CL_Sales_Cards of form Command_Sales),
	Seq,
	CMD_BUILTINCMD_DICTID, 
	CMD_BUILTINCMD_FORMID, 
	resourceid(command cmdSeparator),
	true,
	LoadMode);

if Status <> OKAY then
	error "Could not add separator item.";
end if;

{Add the IG_Lead_Maintenance command}
Seq = 0;
Status = AddCommandToMenu(DYNAMICS, 
	resourceid(form Command_Sales), 
	resourceid(command CL_Sales_Cards of form Command_Sales),
	Seq,
	3333,
	resourceid(form Command_IG_Sample),
	resourceid(command IG_Lead_Maintenance of form Command_IG_Sample),
	true,
	LoadMode);

if Status <> OKAY then
	error "Could not add command IG_Lead_Maintenance.";
end if;


Documentation Feedback