Note that you can't use the ON_UPDATE_COMMAND_UI message on this toolbar, since it can only be refresh when the dialog enters in idle state. To do so, you must subclass the CToolBar (or CStatusBar) class - in CMyToolBar for instance -, add the message handler for WM_IDLEUPDATECMDUI, and write the following code in this function : 
/////////////////////////////////////////////////////////////////////////////
// CMyToolBar::OnIdleUpdateCmdUI
// OnIdleUpdateCmdUI handles the WM_IDLEUPDATECMDUI message, which is 
// used to update the status of user-interface elements within the MFC 
// framework.
//
//  We have to get a little tricky here: CToolBar::OnUpdateCmdUI 
// expects a CFrameWnd pointer as its first parameter.  However, it
// doesn't do anything but pass the parameter on to another function
// which only requires a CCmdTarget pointer.  We can get a CWnd pointer
// to the parent window, which is a CCmdTarget, but may not be a 
// CFrameWnd.  So, to make CToolBar::OnUpdateCmdUI happy, we will call
// our CWnd pointer a CFrameWnd pointer temporarily.   LRESULT CMyToolBar::OnIdleUpdateCmdUI(WPARAM wParam, LPARAM) 
{
if (IsWindowVisible()) 
{
CFrameWnd *pParent = (CFrameWnd *)GetParent();
if (pParent)
OnUpdateCmdUI(pParent, (BOOL)wParam);
}
return 0L;
}
In order to have the toolbar updated you MUST override the ContinueModal() function that way: