Sunday, January 6, 2008

To remove a toolbar button programmatically?

void CMainFrame::OnDelete( )
{
m_wndToolBar.SendMessage ( TB_DELETEBUTTON, ( WPARAM ) 0 ) ;
}
Here, we have called SendMessage( ) function and passed it the message TB_DELETEBUTTON, as we want a toolbar button to be deleted and a zero-based index of the button to be deleted.

No comments: