I've created them with the TBBS_CHECKBOX style, and that works,
but how can I manually Get or Set the state of the buttons
(pushed or not pushed) when I need to?
Thanks!
peter
One method I've used, is 'SetButtonInfo(....)'. It deals with the
toolbar buttons,
and says...which button on the toolbar, what command, what style, and what
bitmap
image to put on the button.
//Change the apperance of toolbar connection button(my button)
CToolBar* pToolBar = (CToolBar*)
AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_TOOLBAR);
pToolBar->SetButtonInfo(8,ID_FILE_CLOSE,TBBS_BUTTON,10);
Hope this helps,
Ray K.
Peter Hirschberg <pet...@REMOVEcronuscom.com> wrote in article
<714pju$gpb$1...@callisto.clark.net>...
If you're using CToolBar, you should be able to get hold of the underlying
common control class CCToolBarCtrl using GetToolBarCtrl(). That has
functions for setting the state of buttons directly, e.g.
CToolBarCtrl::CheckButton..
Alternatively you can set the button states in their update UI handlers,
(e.g. pCmdUI->SetCheck...)
pCmdUI->Enable();
pCmdUI->SetCheck();