If I create a button in the Win32 API, the default conrol theme looks like a Windows 95/98 button. I remember in the past the Microsoft forums told me how to get the XP style, but I don't recall how to do this. Is there a way to programatically or manually change the control themes in a Win32 application? Thanks.
Asked
Active
Viewed 7,024 times
2 Answers
11
You want to Enable Visual Styles by adding a manifest dependency to the common control 6 assembly to your applications manifest.
If you use DevStudio it should be as simple as adding the #pragma directive from the linked page:
#pragma comment(linker,"\"/manifestdependency:type='win32'
name='Microsoft.Windows.Common-Controls'
version='6.0.0.0' processorArchitecture='*'
publicKeyToken='6595b64144ccf1df' language='*'\"")

Chris Becke
- 34,244
- 12
- 79
- 148
1
SetWindowTheme Function would appear to be the solution. HTH

JustBoo
- 1,723
- 9
- 9
-
1I compiled successfully using the following: SetWindowTheme(hButton, L"Explorer", NULL); But I don't see any theme changes. I'm using Vista/VS2003 but I'm assuming that's fine. – Phil Aug 19 '10 at 17:49