This document describes how to use the demos.

Files

There are several zip files attached. The package like “Demo1” are MFC projects which contains the demo source code.
The package resource.zip contains all the image files used by these demos. Please copy it to the same directory of the executable files.
To get all the demos, please download the package demos.zip which includes all the demos and resource images.
There are also documents in each demo package, describes the demos with more details.
Demo1 and demo4 also made step-to-step descriptions about how to use StdCtrlSkinTool in dialog-based and view-based applications.
The executable files are available in the package DemoExe.zip. This package also includes all the configure files and resources. Please note that the configure file of demo1 and demo2 need rename.

Using StdCtrlSkinTool

You could select to build the StdCtrlSkinTool as a library, or add it to the demo project.
In order to build it as a library, please create an MFC extension library project, and copy the source code in it. Then, modify the properties of demo projects to use this library.
In order to add it to the demo project, please copy all the files of StdCtrlSkinTool to the demo project, and modify the file “StdCtrlSkin.h”, remove {AFX_EXT_CLASS} declaration of class “CStdCtrlSkin”.

Configure files

There are multiple configure files created for the demos. In order to use them, you will need to copy them together with the executables. For some of the demos, the configure files need to be renamed before using. For example, Demo1 will use the configure file “demo1.cfg.xml”, so you will need to rename one of the configure files to this name. These configure files will make the demo get different appearances, so please try them one by one.
Only the configure files in demo1 and demo2 needs rename. Please also refer to the documents of these two demos for more details.

Demo packages

Demo1 shows how to integrate the StdCtrlSkinTool into your application with step-to-step guideline, and how to do layout.
With different configure files, you will get completely different layout without any change of your source code.
And you will be able to hide some controls with a different configure file.
Demo2 shows the skin functionality of StdCtrlSkinTool. You will see how to draw different skins and backgrounds of your application.
To get a beautiful skin, all you need is a good painter.
Demo3 shows how to use group controls. It is a little tricky but still easy to use group controls.
Demo4 shows how to use StdCtrlSkinTool in a view-based application, while other demos are using dialog-based application.
In this demo, we also showed how to use multiple configure files in the same application.
Demo5 shows a common IM client dialog in a DirectUI style. It is able change skins on the fly, and has different views in the main dialog.
In order to create this demo, there are only about 100 lines written in the source code, from the empty dialog created by Visual studio, while most of them are easy lines that logging the controls.
The configure file is a little more complicated, but still simple with 100 lines.
The only difficult job is making it more beautiful. I am sorry that this demo is not so good looking cause I am not good at painting.
Demo6 shows how to manage the control added and removed controls dynamically. It is easy to manage the controls added in the dialog editor, and also easy to manage the controls added and removed in the run time. There are only several lines needed to do this.
Demo7 shows the flexibility of layout management. With two buttons and several lines of code, you will be able to implement the functionality of a tab control. This demo also showed how to use multiple window definitions in the same dialog.
Of course, this demo is created in order to show the flexibility of the StdCtrlSkinTool, not trying to replace the tab control.
You can implement anything with StdCtrlSkinTool. The only limitation is the imagination.