title: MFC: CMFCToolBar SetButtonStyle not wirking with style TBBS_PRESSED?
body: <p>byIs there are bug in control ? or I am doing something wrong ?</p>
  
  <p>In .h<br>
  <code>CMFCToolBar m_wndToolBar;</code><br>
  in message map<br>
  <code>ON_COMMAND(ID_MYID, &amp;CMainFrame::OnToolBar)</code>  </p>
  
  <p><code>void CMainFrame::OnToolBar()</code><br>
  <code>{</code><br>
  <code>int nIndex = m_wndToolBar.CommandToIndex(ID_MYID);</code><br>
  <code>UINT nState = m_wndToolBar.GetButtonStyle(nIndex);</code><br>
  <code>if(nState &amp; TBBS_PRESSED)</code><br>
  <code>nState &amp;= ~TBBS_PRESSED;</code><br>
  <code>else</code><br>
  <code>nState |= TBBS_PRESSED;</code><br>
  <code>m_wndToolBar.SetButtonStyle(nIndex,nState);</code><br>
  <code>m_wndToolBar.InvalidateButton(nIndex);</code><br>
  <code>}</code></p>
  
  <p>By clicking on button I need to set button pressed, and when user clicked again, button become unpressed.</p>
  
  <p>Nothing happens by clicking on button :(</p>