Hello There, Guest! (LoginRegister)

Skinning Documentation

Introduction to Skinning
Getting Started
What's a Skin in Messenger Plus! ?
How Does it Work?
Integration with Messenger
Your First Skin
Skins Essentials
Windows Definitions and Styles
The Trace File
Using Pictures
Packaging Your Skin
Specialized Subjects
Restrictions: How and Why?
Reshaping Your Windows
User Modifiable Options
Options for Advanced Users
Skinning Plus! Itself
Encoding and Decoding UIB
XML Schemas Reference
SkinInfo Files
SkinInfo Information
SkinInfo Diagram
Schema Documentation
Messenger Plus! Interfaces
Interfaces Information
Schema Documentation

How Does it Work?

Physically, Messenger Plus! skins are organized into folders and files, located in the "Skins" subdirectory of Messenger Plus! Live's main directory (C:\Program Files\Messenger Plus! Live\Skins by default). Each skin has its own directory, generally named the same way as the skin. The actual data defining what the skin does to Messenger is located in a single file called SkinInfo.xml. If you have already worked on Messenger Plus! scripts, this should all sound familiar to you.

The SkinInfo.xml file is what you really want to concentrate on. Adding lines to this file means adding features to your skin. The file itself uses XML syntax and it is recommended (but not required) to save it in Unicode (UTF-16) for internationalization and loading speed reasons. XML files are basically organized text files and if you're not familiar with them, it is very important that you learn a little bit more on the subject before continuing with this documentation. A simple search on the internet will give you all the information you need on that subject.

To ensure your file is properly written for Messenger Plus!, you will also need to validate your data with the associated schema file. The schema file is distributed with this documentation along with its own associated documentation. Everything you can do in your skin is written in this file. Once you'll know more about the basics, you'll be able to use the schema as a reference while writing your XML code.

XML files are used to write data. Three kinds of data can be added in skininfo:

  • Information data. Examples: name of the skin, compatible versions of Messenger, etc...
  • Embedded skin data. Example: new lines of text to replace Messenger's original strings.
  • References to external data. Example: file name of a new picture to replace an existing one in Messenger.

Skin data is anything that is being fed to Messenger, in other words, skin data is the resources you'll modify for your skin. This includes pictures, bitmaps, icons, lines of text, windows definition files, dialog boxes, menus, etc... depending on the type of resource, data can be specified in 3 different ways:

  • Text embedded directly in the skininfo file.
    Allows quick and easy replacement of resources such as strings.
  • A file placed in the directory or a subdirectory of the skin.
    Ideal for images and windows definition files.
  • A resource compiled in a DLL file distributed with your skin.
    Required for dialog boxes and menus. Most other types of resources can also be distributed in DLL files if you don't want your files to be too easily accessible to your users.

So, to sum things up, a skin needs some information concerning itself and its surroundings, and it needs new data to replace existing stuff in the Messenger resources. Let's see how these elements all come together.

The Basics of SkinInfo

As explained previously, skininfo is the place where you'll specify all the information and data concerning your skin. Only two elements are required at the root of the file: Information and MessengerSkin. Information is explained in details in Packaging your Skin, all you need to know for now is that any skin requires a name. MessengerSkin is where things start to get interesting as all the data you'll use in your skin is defined there:

SkinInfo\MessengerSkin

Skin data is organized in what's called resource groups. Although simple skins may not need more than one group, this additional entity allows your skin to be more flexible thanks to the use of restrictions. All the data defined in a resource group is subject to a certain set of restrictions defined by the skin developer. Many kinds of restrictions exist but only one is required for each group and that's the MsgVersions restriction.

When adding data to a new resource group, you must specify the Messenger versions that the data applies to. For new skins, all you need to do is specify your own version of Messenger for the restriction. Then, once you're satisfied with the results, you may want to test your skin in a previous version of Messenger so that more people can enjoy the skin. If everything works just the same in the other version, all you need to do is add the version number to the restrictions of your resource group. If not, you either keep things this way to prevent people from messing up an older version of Messenger with your work (and future unknown versions as well) or you have the possibility to create a new resource group and add specific data for different versions of Messenger. This way, a single skin can be used in a broad range of environments without problems or need for duplication.

Despite the flexibility offered by the restrictions system, the implementation was kept very simple. Here is an example of what an empty resource group applying to Windows Live Messenger 8.5 looks like in XML:

<MessengerSkin>
    <ResGroup>
       <Restrictions>
            <MsgVersions><Version Major="8" Minor="5"/></MsgVersions>
        </Restrictions>

        ...
    </ResGroup>
</MessengerSkin>

Remember that internal version numbers can sometimes be different from the public name given to Messenger. You'll find exact version numbers of any given version of Messenger by going in the "Help\About" menu. For example, Messenger 2009 is version 14.0.

Replacing Messenger Resources

Once a resource group is created in the skininfo file, all you need to do is add actual resource data to the group. The Resources element offers two different categories: New and Replace. The first one allows you to add new resources to Messenger using new resource ids (you'll learn the use of this in the Windows Definitions and Styles section). The second one is what most skinners will be first interested in as it allows you to replace existing resources in Messenger.

For clarity reasons, replaced resources are organized into categories and sub-categories. Here is the full listing of what Messenger Plus! skins allow you to change in Messenger:

SkinInfo\MessengerSkin\ResGroup\Resources\Replace

Most skinners will concentrate on Definitions, Styles and Pictures and for your first attempts, you should concentrate on the later with maybe the addition of Strings as they are simple and safe to test. By default, Messenger Plus! automatically detects the original source of each resource category as most resources can only be defined in one place. Resources can either be replaced in the main Messenger executable, in the Messenger resources DLL or in the Messenger language DLL.

Here are some examples of sources: all the Pictures used in Messenger (not including older Bitmaps and special Vista pictures) are coming from msgsres.dll so there's no point in specifying the source every time you want to replace one of them. In that case, the Source attribute of the Picture element you're replacing will always be "msgres" and does not need to be specified. However, resources like Icons can come from both the executable and the resources DLL of Messenger so the Source attribute can either be "msgexe" or "msgres" and will need to be specified to avoid confusion. The sources allowed for each category of resource along with their respective defaults are documented in the schema file of skininfo.

To replace a resource, all you need to know is its id. How to get it is explained in the Integration with Messenger section. A resource id is unique in a given file, for a given resource category. This means that a bitmap and an icon could have the same id, two pictures from two different resource files could have the same id, but two bitmaps from the same file cannot. In order to facilitate your work, special resources such as icons (that are generally represented in groups) and strings (represented in tables) are appropriately separated. Each different format of an icon file has a different id and each string also has a different id (the id of the icon groups and the string tables are irrelevant in a skininfo file).

Here is an example showing how to replace a string and a window's definition file:

<Resources>
    <Replace>

        <Strings>
            <String Id="11">Messenger is signing in</String>
        </Strings>

        <Windows>
            <Definitions>
                <Definition Id="923"><File>mainwnd_def.txt</File></Definition>
            </Definitions>
        </Windows>

    </Replace>
</Resources>

Now that you know how to replace resources in your skininfo file, it's time to see how Messenger Plus! will help you find those precious resource ids. The next section will tell you all about the integration of skin features into Messenger.

See Also

Introduction to Skinning, Integration with Messenger section, SkinInfo Information.