Ole4D Methods

OCEnableMenu(p_AreaVar;p_Enable)


Enable/disables embedding of the ole object menu.
One of the effects of menu embedding has, is that it replaces the 4D main menu with the ole object’s menu. If the object has no menu bar or is not activated in place than this method has no effect. This method does not affect the context menu of the object. The context menu can always be invoked by the user.

Parameters
Parameter Type   Description
p_AreaVar Longint -> Variable of the plug-in area.
p_Enable Longint -> Can have two values
0 – no restrictions
1 – disable menu placing


Return Values
The operating system code of invalid parameter error - if the area sent as parameter does not exist or p_Enable differs from 0,1.

Remarks
If the object is already created and activated changes will take place only after reactivating the in place object. Depending on the type of the ole object you might need to destroy the object, create and reactivate it for changes to take place.