#cs ____________________________________
脚本目的:利用.she换肤窗口
准备工作:
1.必须文件:皮肤文件.she和USkin.dll;
窗口换肤过程:
1.fileinstall()所需文件;
2.定义变量$skins和$DLL_存储换肤文件;
3.利用DLLCALL()启用皮肤。
注意事项:
1。注意用fileinstall()载入文件的源路径必须是字符不能有变量;
2.注意路径“\”符号必须存在,否则因路径导致无法找到更换皮肤所需文件;
3.注意退出时将载入文件删除。
#ce _______________脚本开始_________________
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
FileInstall("aero.she",@ScriptDir & "aero.she")
FileInstall("Skin.dll",@ScriptDir & "Skin.dll")
$skins=@ScriptDir & "aero.she"
$Dll = DllOpen(@ScriptDir & "Skin.dll")
DllCall($Dll, "int", "SkinH_AttachEx", "str", $skins, "str", "mhgd")
DllCall($Dll, "int", "SkinH_SetAero", "int", 1)
$Form1 = GUICreate("test .she skin", 634, 455, -1, 169)
$Label1 = GUICtrlCreateLabel("Label1", 80, 48, 127, 52)
GUICtrlSetFont(-1, 30, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$check1 = GUICtrlCreateCheckbox("CheckBox", 80, 148, 200, 52)
GUICtrlSetFont(-1, 30, 400, 0, "MS Sans Serif")
$radio1 = GUICtrlCreateRadio("Radio", 80, 248, 127, 52)
GUICtrlSetFont(-1, 30, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
DllCall($Dll, "int", "SkinH_SetForeColor", "HWND", GUICtrlGetHandle($Label1), "int", 255,"int",0,"int",0)
DllCall($Dll, "int", "SkinH_SetForeColor", "HWND", GUICtrlGetHandle($check1), "int", 255,"int",0,"int",0)
DllCall($Dll, "int", "SkinH_SetForeColor", "HWND", GUICtrlGetHandle($radio1), "int", 255,"int",0,"int",0)
;~ DllCall($Dll, "int", "SkinH_DetachEx", "HWND", GUICtrlGetHandle($Label1))
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|