BCGControlBar Pro for MFC
UINT CBCGPCaptionButton::GetHit ( ) const

Returns the hit test of a caption button.

Returns
A value that represents the hit test of a caption button.

The hit test of the button represents at the same time the ID of the button.