tags:

views:

397

answers:

2

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

+1  A: 

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.

Franci Penov
+1  A: 

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.

Larry Osterman