cwindowswinapibuttonvisual-styles

Programming In C + Win API: How To Get Windows 7 Look For Controls?


I am programming strictly in C and WinAPI, no C++ or C#. I am a beginner and just learning to draw controls etc. The thing is that when I create Windows or other controls like Command Buttons, they have Windows Native look. Take a look at this:

This is look I am getting!

But in Windows 7, the command buttons look like this:

enter image description here

Now, how do I get command buttons in my program to look like that. Is it even possible? I am following this tutorial, for reference: http://zetcode.com/gui/winapi/

Thanks.


Solution

  • You enable visual styles for your app by providing an XML manifest, either as a separate file or as an embedded resource. See Enabling Visual Styles for details.