BCGControlBar Pro for MFC
virtual int CBCGPToolBar::HitTest ( CPoint  point)

Determines which toolbar button is at a specified position.

The index of the button at the position specified by point, if any, -1 otherwise.

Usually, this function is called by the framework. You can override it in a CBCGPBaseToolBar - derived class if it has additional elements to test.

pointPoint to be tested (in window relative coordinates).