0

I have in my editor few editing modes. I can choose specific mode using buttons that are placed on a toolbar. I want to indicate which mode is currently on. When I press appropriate button - I want to make the clicked button remain pushed. How do I do that in WinAPI? My toolbar uses bitmaps for icons if that's relevant.

1
  • No. Just plain WinAPI. Commented Apr 15, 2013 at 12:49

1 Answer 1

1

There used to be a way to get something like the look and feel of a toolbar by using a normal check box with the BS_PUSHLIKE style set. But that got broken a bit with Windows XP because of mouse hover effects, so it's not widely used any more.

If you want to create your own toolbar, without the help of MFC, there is an MSDN article that covers the creation and management of a toolbar window (actually a dedicated window class as part of the Common Controls Library).

Sign up to request clarification or add additional context in comments.

1 Comment

Ok, BS_PUSHLIKE seem dodgy since it's a checkbox style and I wanted to leave it as toolbar with actual buttons. I've found about TB_SETHOTITEM message and it works well for my purposes. Thanks for looking!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.