简体   繁体   中英

How to Skin an Win32 Application

Win32 look nasty, how to make it look better by custom skins?

I mean something like Adobe products, iTunes, Autodesk 3dsmax and Softimage XSI, Windows media player, Blender, Comodo firewall, Winamp, Babylon client, and few download managers etc. ;

there are many similar applications out there but I can't find any proper tutorial or guideline, it looks like secret recipe!

only -two- tutorials available online:

old and useless: http://www.codeproject.com/Articles/20497/Draw-Skin-Window-Using-Pure-Win32-API

only cover opaque background (and this is what I avoid, I need more about GUI components): http://www.flipcode.com/archives/Win32_Window_Skinning.shtml

Is there any book or proper guideline to learn how to build skins for Win32api?

Edit: I accept David Rodríguez comment, down there ↓↓

I have done this before using C++ Builder. The approach I took was to create a form, set it to be borderless and color the entire form the same color. Then I set the form transparency to this color. I then add images to the form which create the desired skin.

I'm sure this can all be done through standard win APIs, but I can't describe (or advise) doing it solely through API calls.

If you are not afraid to learn how to use low level SDK programming, then try this link: Take control of your window code

Also do a Google search for WinLIFT.

The operating system handles "skinning" for you automatically.

In "classic" mode (or Windows 2000 and earlier versions), this gets you a, well classic-looking interface. The windows are drawn just like they always were since Windows 95. Presumably, this is what you are referring to when you say that "Win32 look nasty". However, you need to realize that many people like this look and specifically choose to enable it on their machines. [WARNING: Personal opinion coming up!] I'm one of those people, and judging from the screenshots that get posted here from developers' machines, I'm definitely not the only one.

Windows XP actually introducing the "skinning" or theming engine, which lives in a set of Windows DLLs. By explicitly linking to version 6 of ComCtl32.dll , your application would automatically get these visual effects. Some people said this version of Windows looked "Fisher-Price" , while others were perfectly happy with the term "gaudy". The option was retained to allow the user to switch to the "classic" theme (as described above), if desired.

Windows Vista completely overhauled Windows's theming engine and introduced a new UI known as "Aero". This provides flashy-looking windows and controls, complete with transparency effects—that is, as long as your graphics card supports it. Again, by explicitly linking to version 6 of ComCtl32.dll, your application would automatically get all of these styles applied.

It's worth noting that through all of this, Microsoft has provided users with the ability to customize the colors (and fonts and other things) used in the user interface. For example, Aero defaults to blue. If you don't like blue, you can change it. I change my UI colors periodically for fun and to re-energize myself. If you can't read or don't like the font, you change it, too.

Thus, if you choose to do something different with your application, defining your own custom color palette and ignoring the options chosen by the user through the provided customization interface, your app is going to look broken and stick out like a sore thumb on the user's desktop. When designing a UI, the last thing you want to do is to be or look different.

In short, upgrade your computer to Windows Vista or later and enable the Aero interface if you want flashy. Don't override the user or try to custom draw all of your controls. You'll just end up with an application that is hard to use, doesn't work as expected, is a pain in the rear to maintain, and just generally looks worse than if you'd simply left it alone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM