Reputation: 3349
I would like to add a simple text button to my c++ win32 application. I'm creating the button using CreateWindowEx function, but can't figure out the correct style to do so. I would like to display a text only button and be able to recive messages when the user clicks on it. The style i would like to get is identical to the text button in windows 7 system volume control (where it says "Mixer"). If possible i would like to display a tooltip also.
Upvotes: 3
Views: 987
Reputation: 16142
Actually that button is an owner draw button - it listens to mouse move messages and when you hover over it, it underlines the text (the syslink control doesn't have this behavior). Otherwise it's a stock button.
Upvotes: 3
Reputation: 5095
You could create a "Button" class window with the BS_OWNERDRAW style and handle the WM_DRAWITEM messages. In your WM_DRAWITEM message handler you can simply display the text.
Upvotes: 3
Reputation: 613531
That mixer control looks more like a hyperlink control than a button. I'd go for the SysLink
control if that's what you need.
Upvotes: 5