Online Help
Skin is an action plugin that can be used to apply visual styles to an application created with AutoPlay Media Studio. You will need at least one file in the MSSTYLES format.
Loads and applies a visual style to current window and child windows.
(number) Handle to the window to be skinned. You will get this handle with Application.GetWndHandle().
(string) The full path to the file with the visual style to be used. For example: ".\\AutoPlay\\Docs\\VisualStyle.msstyles". To revert to the default window appearance, or just to initialize the plugin, leave the field blank ("").
(string) The substyle of the skin to be used. Several skins feature more than one substyle, for different color schemes, and/or different font sizes. If there is only one substyle in the skin, or you want just to load the default appearance, leave this field blank ("").
(value) 0 if success, 1 otherwise. You can use Application.GetLastError to determine whether this action failed, and why.
-- Load and apply a skin result = Skin.ApplyStyle(hWnd, ".\\AutoPlay\\Docs\\MyOwnSkin.mysstyles", "NormalBlue.ini");
Retrieves the substyles names from a visual style.
(string) The full path to the file with the visual style to be used. For example: ".\\AutoPlay\\Docs\\VisualStyle.msstyles".
(table) A table with the names of the available substyles in the skin. You can use Application.GetLastError to determine whether this action failed, and why.
substyles = Skin.GetSubstyles(".\\AutoPlay\\Docs\\MyOwnSkin.mysstyles");
if (Table.Count(substyles) > 1) then
-- several themes in the selected visual style
for i, name in substyles do
-- display all the names in a ListBox
ListBox.AddItem("Substyles", name, i);
end
end
Retrieves the COLORREF value of a component of the current skin.
(number) A number identifying the color index of a skin.
(string) A number as hexadecimal string, repesenting the RGB values of the color. You can use Application.GetLastError to determine whether this action failed, and why.
-- try to use a matching background color for our window, using a color defined in the skin
-- two of the best matches are: (always check what works best for you)
-- 3 = the menu background color defined in the skin
-- 4 = the window background color defined in the skin
color = Skin.GetColor(4); -- returns the color as string representation of a hexadecimal RGB
tbPageProperties = {}
tbPageProperties.BackgroundColor = Math.HexColorToNumber(color);
Application.SetPageProperties("Page1",tbPageProperties);
12011 - Failed to open Skin Actions plugin.
12012 - Could not load skin.
12013 - Could not open skin file.
You can use any visual style in the MSSTYLE format. There are thousands of styles available on the internet, but to use them in your product you might need to contact the author before using his work in a commercial application.
MSSTYLES are dynamic link libraries (DLL's), so remember that they can be compressed substantially with certain tools.
Ulrich Peters
upeters@mindquake.com.br
Plugin is copyright © 2008-2009 MindQuake Serviços de Informática Ltda.
Copyright © 2008-2009 MindQuake Serviços de Informática Ltda.
All Rights Reserved.