还是皮肤问题(在目录下运行正常,换目录运行不了)
本帖最后由 feicuiboy 于 2009-9-9 07:19 编辑#include <GUIConstantsEx.au3>
dim $form
$form=GUICreate("控制面板", 451, 437, 224, 146)
GUICtrlCreateGroup("控制面板", 8, 0, 433, 425)
$control = ObjCreate("Shell.Explorer.2")
$Obj = GUICtrlCreateObj($control, 16, 24, 417, 393)
$control.navigate("file:///::%7B20D04FE0-3AEA-1069-A2D8-08002B30309D%7D%5C::%7B21EC2020-3AEA-1069-A2DD-08002B30309D%7D")
$form=GUICreate("控制面板", 451, 437, 224, 146)
_SkinGUI("SkinCrafterDll.dll", "Accent.skf", $form)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Quit()
exit
EndSwitch
WEnd
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
$Dll = DllOpen("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", $SkincrafterSkin)
DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25)
DllCall($Dll, "int:cdecl", "ApplySkin")
EndFunc ;==_SkinGUI
Func Quit()
GUISetState(@SW_HIDE)
$Dll = DllOpen("SkinCrafterDll.dll")
DllCall($dll, "int:cdecl", "DeInitDecoration")
DllCall($dll, "int:cdecl", "RemoveSkin")
DllClose($dll)
;DirRemove(@AppDataDir&"\skin",1)
Exit
EndFunc
疑问:SkinCrafterDll.dll和皮肤文件
需要在编译后的文件中用fileinstall先加载然后在调用吗??
运行完成退出前还需要在卸载??运行不了是否是这个问题?? SkinCrafterDll.dll Accent.skf 都得跟着,或者打包进编译 经测试,不是这个问题,高手指点下 本帖最后由 feicuiboy 于 2009-9-2 21:34 编辑
已解决,是皮肤的路径问题。谢谢
在原来的自定义函数前加上 $Dll = DllOpen($dii9)($dll9为路径)即可
Func Quit()
GUISetState(@SW_HIDE)
$Dll = DllOpen($dii9)
DllCall($dll, "int:cdecl", "DeInitDecoration")
DllCall($dll, "int:cdecl", "RemoveSkin")
DllClose($dll)
Exit
EndFunc
还有个问题:
用filedelete(路径)无法删除 SkinCrafterDll.dll这个文件,该如何操作 :face (3):加上皮肤,又老又丑 :face (3):加上皮肤,又老又丑
破帽遮颜 发表于 2009-9-2 21:48 http://www.autoitx.com/images/common/back.gif
同感~~~~~~~
ps, dll文件删不掉也就是那里DllOpen出了问题... 但是DllOpen后面不是有个dllclose吗?
如果不加$Dll = DllOpen($dii9),又运行错误
指点指点,谢谢 :face (3):加上皮肤,又老又丑
破帽遮颜 发表于 2009-9-2 21:48 http://www.autoitx.com/images/common/back.gif
不加皮肤,也感觉界面不美观呀。 在函数外声明 $Dll (即在你脚本前面 Dim $form, $Dll),然后去掉你之前的那句 $Dll = DllOpen($dii9)
即可 thanks,解决 LZ应该把最终的脚本放上来 呵呵,不知道
页:
[1]