Поделиться через


COleControl::OnQueryHitRect

Called by the framework in response to a container's IViewObjectEx::QueryHitRect request.

virtual BOOL OnQueryHitRect(
   DWORD dwAspect,
   LPCRECT pRectBounds,
   LPCRECT prcLoc,
   LONG lCloseHint,
   DWORD* pHitResult 
);

Параметры

  • dwAspect
    Specifies how the object is to be represented. Valid values are taken from the enumeration DVASPECT or DVASPECT2.

  • pRectBounds
    Pointer to a RECT structure specifying the bounding rectangle of the OLE control client area.

  • prcLoc
    Pointer to the RECT structure specifying the rectangle to be checked for a hit (overlap with the object rectangle), relative to the upper left corner of the object.

  • lCloseHint
    Not used.

  • pHitResult
    Pointer to the result of the hit query. One of the following values:

    • HITRESULT_OUTSIDE   no point in the rectangle is hit by the OLE object.

    • HITRESULT_HIT   at least one point in the rectangle would be a hit on the object.

Возвращаемое значение

Nonzero if a hit result is successfully returned; otherwise 0.

Заметки

Queries whether an object's display rectangle overlaps any point in the given rectangle (hits the rectangle). QueryHitRect can be overridden to test hits for non-rectangular objects.

Требования

Header: afxctl.h

См. также

Основные понятия

COleControl Class

COleControl Members

Hierarchy Chart

COleControl::OnQueryHitPoint