Ole4D Methods

OCDocWindowActivated(p_AreaVar;p_Activated)


Some Ole documents disable parts of their user interface, like toolbars, when the parent window is de-activated.
You have to call this command,in order to notify the plug-in that the parent window was activated.
You have to do this for Ole documents,like MS Word or Excel for example.
Calling this method from the On Activate event of the window which contains the plug-in solves some problems which may lead in bad focus, or in toolbars "freeze".

Parameters

Parameter Type   Description
p_AreaVar Longint  -> Variable of the plug-in area.
p_Activated Longint ->

1 - meaning the window is activating
0 - the window is deactivating



Return Values
0 – The method call was successful.
If the method call was not successful the return value is non zero. For more information call OCLastError.

Remarks
The area must contain an Ole object at the time this function is called. If no object is associated with the area calling this function was no effect.