I have used PressButton to show a toolbar button pressed down. How can I now get that button to unpress?
Thanks
Printable View
I have used PressButton to show a toolbar button pressed down. How can I now get that button to unpress?
Thanks
Have you tried PressButton( SomeButtonID, FALSE)?
The second parameter to PressButton is TRUE to press a button, FALSE to release a button.
Thanks Bob.
Do you know how to initially set up buttons as greyed out and then enable them say when you open a file. As before the buttons are not attached to any menu option.
Thanks again
The combination of CToolBarCtrl::GetState and CToolBarCtrl::SetState should do what you want. I believe the symbolic name of the bit
you want is TBSTATE_ENABLED; the state bits are discussed in the help for CToolBarCtrl::AddButton.