BCGControlBar Pro for MFC
UINT BCGM_ON_BEFORE_RIBBON_MAIN_PANEL

Sent to Ribbon's parent before application (main) panel has been displayed.

Parameters
wParamThis parameter is not used.
lParamThis parameter is not used.
Returns
returns FALSE to display the application panel. Returns TRUE to prevent the application panel from being displayed.

The framework sends BCGM_ON_BEFORE_RIBBON_MAIN_PANEL registered message to the Ribbon's parent before application (main) panel has been displayed.