POINTERINACTIVE enumeration

Indicate the activation policy of the object and are used in the IPointerInactive::GetActivationPolicy method.

Syntax


typedef enum tagPOINTERINACTIVE { 
  POINTERINACTIVE_ACTIVATEONENTRY    = 1,
  POINTERINACTIVE_DEACTIVATEONLEAVE  = 2,
  POINTERINACTIVE_ACTIVATEONDRAG     = 4
} POINTERINACTIVE;

Constants

POINTERINACTIVE_ACTIVATEONENTRY

The object should be in-place activated when the mouse enters it during a mouse move operation.

POINTERINACTIVE_DEACTIVATEONLEAVE

The object should be deactivated when the mouse leaves the object during a mouse move operation.

POINTERINACTIVE_ACTIVATEONDRAG

The object should be in-place activated when the mouse is dragged over it during a drag and drop operation.

Remarks

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.

Important  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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

See also

IDropTarget
IPointerInactive
IPointerInactive::GetActivationPolicy

 

 

Show: