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 the number of a tag.
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.