BCGControlBar Pro for MFC
UINT BCGM_ON_CHANGE_RIBBON_CATEGORY

This message is sent to parent frame when a Ribbon active tab (category) was changed.

Parameters
wParamContains a zero-based index of the tab (category).
lParamA pointer to ribbon control.
Returns
The return value is ignored.

You should process this message to receive notifications from Ribbon bar when an active tab (category) was changed.