H4cKL0rD
H4cKL0rD

Reputation: 5508

Styles of buttons on win32 C++

i know there are some styles you can put on a button in C++ win32 exa. like BS_DEFPUSHBUTTON BS_RADIOBUTTON but i do not know all of them and also how would i go about making a user drawn button

Upvotes: 1

Views: 5885

Answers (2)

Larry Osterman
Larry Osterman

Reputation: 16142

And if you only want to tweak the button drawing algorithm, you should look at the DrawThemeBackground API - that allows you to draw the button using the same visuals that the standard Windows Theme engine uses.

You do need to be careful to handle the case when theming is disabled (when OpenTheme fails) however - in that case you're on your own unfortunately.

Upvotes: 1

Franci Penov
Franci Penov

Reputation: 75982

You can find the reference of all button styles on MSDN (as usual). And an overview of the Button control in general.

To create an owner drawn button, you need to specify the BS_OWNERDRAW flag and pocess the WM_DRAWITEM notification in the button parent window.

Upvotes: 2

Related Questions