|
发表于 2009-7-10 21:46:20
|
显示全部楼层
本帖最后由 lynfr8 于 2009-7-11 15:43 编辑
就你给出的代码,只要将红色部分补上就行了
成功运行效果图:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("OnExitFunc","Quit");设置在 AutoIt 退出时将调用的函数(Quit)
#Region ### START Koda GUI section ### Form=
$Form = GUICreate("窗体", 401, 301, 284, 194)
Dim $Dll
FileInstall("SkinCrafterDll.dll", @TempDir& "\SkinCrafterDll.dll",1)
FileInstall("vista_style.skf", @TempDir& "\vista_style.skf",1)
$Dll = DllOpen(@TempDir& "\SkinCrafterDll.dll")
DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1")
DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1)
DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", @TempDir& "\vista_style.skf")
DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Form, "int", 25)
DllCall($Dll, "int:cdecl", "ApplySkin")
$Button1 = GUICtrlCreateButton("1", 60, 56, 100, 30, $WS_GROUP)
$Button2 = GUICtrlCreateButton("2", 240, 56, 100, 30, $WS_GROUP)
$Button3 = GUICtrlCreateButton("3", 60, 152, 100, 30, $WS_GROUP)
$Button4 = GUICtrlCreateButton("4", 240, 152, 100, 30, $WS_GROUP)
$Group1 = GUICtrlCreateGroup("7", 32, 24, 337, 185)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button5 = GUICtrlCreateButton("5", 180, 240, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("6", 290, 240, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
;退出加载皮肤
Func Quit()
GUISetState(@SW_HIDE)
DllCall($dll, "int", "DeInitDecoration")
DllCall($dll, "int", "RemoveSkin")
DllClose($dll)
FileDelete ( @TempDir&"\SkinCrafterDll.dll" )
FileDelete ( @TempDir&"\vista_style.skf" )
Exit
EndFunc |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|