The POINTERINACTIVE enumeration values indicate the activation policy of the object and are used in the IPointerInactive::GetActivationPolicy method.
typedef enum tagPOINTERINACTIVE
{
POINTERINACTIVE_ACTIVATEONENTRY = 1,
POINTERINACTIVE_DEACTIVATEONLEAVE = 2,
POINTERINACTIVE_ACTIVATEONDRAG = 4
} POINTERINACTIVE;
For more information on using the POINTERINACTIVE_ACTIVATEONENTRY and POINTERINACTIVE_DEACTIVATEONLEAVE values, see the IPointerInactive::GetActivationPolicy method.
The POINTERINACTIVE_ACTIVATEONDRAG value can be used to support drag and drop operations on an inactive object. An inactive object has no window to register itself as a potential drop target. Most containers ignore embedded, inactive objects as drop targets because of the overhead associated with activating them.
As an alternative to activating an object when the mouse pointer is over it during a drag and drop operation, the container can first QueryInterface to determine if the inactive object supports IPointerInactive. Then, if the object does not support IPointerInactive, the container can assume that it is not a drop target. If the object does support IPointerInactive, the container calls the IPointerInactive::GetActivationPolicy method. If the POINTERINACTIVE_ACTIVATEONDRAG value is set, the container activates the object in-place so the object can register its own IDropTarget interface.
The container is processing its own IDropTarget::DragOver method when all these actions occur. To complete that method, the container returns DROPEFFECT_NONE for the pdwEffect parameter. Then, the drag and drop operation continues by calling the container's IDropTarget::DragLeave and then calling the object's IDropTarget::DragEnter.
Note For windowless OLE objects this mechanism is slightly different. See IOleInPlaceSiteWindowless for more information on drag and drop operations for windowless objects.
If the drop occurs on the embedded object, the object is UI-activated and will get UI-deactivated when the focus changes again. If the drop does not occur on the object, the container should deactivate the object the next time it gets a call to its own IDropTarget::DragEnter. It is possible for the drop to occur on a third active object without an intervening call to the container's IDropTarget::DragEnter. In this case, the container should try to deactivate the object as soon as it can, for example, when it UI-activates another object.
Windows NT: Use version 4.0 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in ocidl.h.
IDropTarget, IPointerInactive::GetActivationPolicy