BCGSuite for MFC
BCGCBPRODLLEXPORT UINT BCGM_ON_SELECT_UNDO_ACTIONS

The message is sent to the main application frame when the user selects some undo actions from the drop-down list.

Add the BCGM_ON_BEFORE_SHOW_UNDO_ACTIONS_LIST registered message handler to the toolbar owner class (e.g., CMainFrame), obtain the number of selected undo actions by calling the CBCGPToolbarUndoButton::GetSelectedActions method, and execute the selected undo/redo actions (specific to your code).

Parameters
wParamcontains the toolbar undo button command ID.
lParama pointer to the CBCGPToolbarUndoButton object.
Returns
non-zero to prevent the undo button's drop-down list from closing.