tags:

views:

660

answers:

2

I want to make a button that looks just like the OK button when you go My Computer -> Help -> About Windows.

I am creating a button like this:

hButton = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("BUTTON"), TEXT("Text"), WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON, 10, 10, 30, 30, hwnd, (HMENU)IDC_MAIN_BUTTON, GetModuleHandle(NULL), NULL);

But it looks like a rough square and does not use the windows styles that the user has selected. I guess I should be using some sort of window class but I am unsure what class?

A: 

Try running ControlSpy which will allow you to try out different styles quickly.

the_mandrill
Does anyone know if you can just somehow specify to use the default style being used by the system? Is style the right word? Style seems to be a type of button, not really anything to do with its visual appearance.
myforwik
these are two distinct concepts: control style and visual theme. your question seem to relate more to visual theme.
Adrien Plisson
+3  A: 

You want to use version 6 of the common controls library. To do this you need to add an application manifest to your executable. See this MSDN article on how to do that.

shf301