I ran into the same problem. It seems that CMFCToolBar does not react on TB_HIDEBUTTON anymore. I think you have to use the visible style on the buttons, e.g.:
void HideButton(CMFCToolBar* pToolBar, int nID, bool bHide)
{
const int nIndex = pToolBar->CommandToIndex(nID);
if (nIndex != -1)
{
CMFCToolBarButton* pButton = pToolBar->GetButton(nIndex);
if (pButton)
{
pButton->SetVisible(!bHide);
pToolBar->AdjustSizeImmediate();
}
}
}