Reputation: 3466
I need to show a text-only button in a toolbar in MFC. How can I do it?
I'm using Visual Studio 2005, so I'm not using MFC Feature Pack classes.
Thanks
Upvotes: 1
Views: 3718
Reputation: 263077
Try passing -1
as the image index and setting the button's text flag:
toolBar.SetButtonInfo(buttonIndex, buttonId,
TBBS_BUTTON | TBBS_AUTOSIZE | BTNS_SHOWTEXT, -1);
toolBar.SetButtonText(buttonIndex, "Button Text");
Upvotes: 5