BCGControlBar Pro for MFC
CBCGPGridRow* CBCGPGridCtrl::HitTest ( CPoint  pt,
CBCGPGridItemID id,
CBCGPGridItem *&  pItem,
CBCGPGridRow::ClickArea *  pnArea = NULL,
BOOL  bItemsOnly = FALSE 

Returns the current position of the cursor related to the CBCGPGridCtrl object.

A pointer to row if the point is located within a row, or NULL, if the specified point is located outside of the grid control .

Call this function to determine the location of the specified point relative to the client area of a grid control.

When the function returns and the return value is not NULL, pnArea contains one of the following values:

  • ClickExpandBox - cursor is located in the expand box area
  • ClickName - cursor is located in the item name area
  • ClickValue - cursor is located in the item value area
  • ClickDescription - cursor located in the item description area

The id contains the clicked item ID (CBCGPGridItemID).

ptClient coordinates of the point to test.
idReceives information about clicked item.
pItemPoints to clicked items when the function returns. It's NULL if no item is clicked.
pnAreaReceives information about the results of the hit test.
bItemsOnlyIf TRUE, the function will hit test only area of items.