CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    4

    How to unpress a button

    I have used PressButton to show a toolbar button pressed down. How can I now get that button to unpress?

    Thanks


  2. #2
    Join Date
    May 1999
    Posts
    42

    Re: How to unpress a button

    Have you tried PressButton( SomeButtonID, FALSE)?

    The second parameter to PressButton is TRUE to press a button, FALSE to release a button.


  3. #3
    Guest

    Re: How to unpress 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


  4. #4
    Guest

    Re: How to unpress a button

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured