That’s how the controls looked back in the 1990s, before themes (visual styles) were invented. As you’ve noticed, modern buttons are now painted all fancy-pants with gradients and throbbing and all that. But for backwards-compatibility reasons, you have to specifically request that your controls get that treatment, or they’ll fall back to the legacy style.
You do that by specifying a manifest. You can either add one in plain text format to your application’s root directory, or you can have Visual Studio (2005 and later) automatically embed one in your EXE.
The second route is the way I’d go. Add the following code to your stdafx.h file to inform the compiler that you want it to add the manifest automatically upon building your project:
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type="win32" name="Microsoft.Windows.Common-Controls" version='6.0.0.0' processorArchitecture="x86" publicKeyToken='6595b64144ccf1df' language="*"\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type="win32" name="Microsoft.Windows.Common-Controls" version='6.0.0.0' processorArchitecture="ia64" publicKeyToken='6595b64144ccf1df' language="*"\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type="win32" name="Microsoft.Windows.Common-Controls" version='6.0.0.0' processorArchitecture="amd64" publicKeyToken='6595b64144ccf1df' language="*"\"")
#else
#pragma comment(linker,"/manifestdependency:\"type="win32" name="Microsoft.Windows.Common-Controls" version='6.0.0.0' processorArchitecture="*" publicKeyToken='6595b64144ccf1df' language="*"\"")
#endif
This MSDN article has more information on visual styles than you could ever want.
And if you really want your application to look native, you need to change the background brush used for the main window. By default, it’s set to use the same color as a textbox’s background (white).
You want to use the color used to paint 3D controls, instead. Modify the hbrBackground member of your WNDCLASS (or WNDCLASSEX) structure as shown here:
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
Why do you have to add 1? For backwards-compatibility reasons, again. The details are boring. 🙂