I added some lines to set state of the toolbar, but once it gets out of ON_UPDATE_COMMAND_UI, the state is reset. What I am trying to do is to set the toolbar button ID_INBOX to TBSTATE_PRESSED when there is new mail and TBSTATE_ENABLED when there is no new mail. But the toolbar keeps flashing when I move the mouse over it. Here is some code: if (pDoc->NewMail()) { if (m_wndToolBarCtrl.GetState(ID_INBOX) != TBSTATE_PRESSED) { m_wndToolBar.LoadToolBar(IDR_MAINFRAME_NEWMAIL); m_wndToolBar.GetToolBarCtrl().SetState(ID_INBOX, TBSTATE_PRESSED); } } else { if (m_wndToolBar.GetToolBarCtrl().GetState(ID_INBOX) != TBSTATE_ENABLED) { m_wndToolBar.LoadToolBar(IDR_MAINFRAME); m_wndToolBar.GetToolBarCtrl().SetState(ID_INBOX, TBSTATE_ENABLED); } } Elizabeth