找回密码
 加入
搜索
查看: 3151|回复: 11

请教关于使用SkinCrafterDll.dll调用皮肤后进度条问题

[复制链接]
发表于 2009-1-16 16:23:13 | 显示全部楼层 |阅读模式
如题,下面这段代码中,如何才能让进度条动起来?
Opt("OnExitFunc","Quit")
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>

#Region ### START Koda GUI section ### Form=


Dim $dll,$bf = "vista.skf" ;皮肤文件路径
$Form1 = GUICreate("窗体1", 413, 305, 302, 218)
_SkinGUI("SkinCrafterDll.dll", $bf, $form1);

;$Progress1 = GUICtrlCreateProgress(120, 120, 150, 16)
$Progress1 = GUICtrlCreateProgress(120, 120, 150, 16, $PBS_MARQUEE)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

_SendMessage(GUICtrlGetHandle($Progress1), $PBM_SETMARQUEE, True, 50)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd


Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle) 
   $Dll = DllOpen($SkincrafterDll) 
   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

Func Quit()
    GUISetState(@SW_HIDE)
    DllCall($dll, "int:cdecl", "DeInitDecoration")
    DllCall($dll, "int:cdecl", "RemoveSkin")
    DllClose($dll)
    FileDelete(@TempDir&"SkinCrafterDll.dll")
    FileDelete(@TempDir&"vista.skf")
    FileDelete(@TempDir&"Splash.jpg")
    Exit
EndFunc
 楼主| 发表于 2009-1-16 16:24:14 | 显示全部楼层
附皮肤,希望高手来帮帮忙!!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-1-16 22:21:25 | 显示全部楼层
你的意思是 不加皮肤的时候是正常的 加了就不动了?
发表于 2009-1-17 00:00:14 | 显示全部楼层
是的。这个问题不管加载任何皮肤都存在有此问题,有时间我研究看下。
 楼主| 发表于 2009-1-17 01:53:55 | 显示全部楼层
原帖由 sxd 于 2009-1-16 22:21 发表
你的意思是 不加皮肤的时候是正常的 加了就不动了?

是的,不加就能一直滚动,加了就不行!
原帖由 sanhen 于 2009-1-17 00:00 发表
是的。这个问题不管加载任何皮肤都存在有此问题,有时间我研究看下。

首先谢谢三恨,不过是在加载皮肤后才无法滚动,初步测试可能是式样的原因.

附不加载皮肤代码

;Opt("OnExitFunc","Quit")
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>

#Region ### START Koda GUI section ### Form=


;Dim $dll,$bf = "vista.skf" ;皮肤文件路径
$Form1 = GUICreate("窗体1", 413, 305, 302, 218)
;_SkinGUI("SkinCrafterDll.dll", $bf, $form1);

;$Progress1 = GUICtrlCreateProgress(120, 120, 150, 16)
$Progress1 = GUICtrlCreateProgress(120, 120, 150, 16, $PBS_MARQUEE)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

_SendMessage(GUICtrlGetHandle($Progress1), $PBM_SETMARQUEE, True, 50)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

;===================================================
;Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle) 
;   $Dll = DllOpen($SkincrafterDll) 
;   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

;Func Quit()
 ;   GUISetState(@SW_HIDE)
 ;   DllCall($dll, "int:cdecl", "DeInitDecoration")
 ;   DllCall($dll, "int:cdecl", "RemoveSkin")
 ;   DllClose($dll)
 ;   FileDelete(@TempDir&"SkinCrafterDll.dll")
 ;   FileDelete(@TempDir&"vista.skf")
 ;       Exit
;EndFunc


[ 本帖最后由 ceoguang 于 2009-1-17 01:58 编辑 ]
发表于 2009-6-22 14:20:11 | 显示全部楼层
路过 顶一下 皮肤还是要用用比较好
发表于 2009-6-22 16:00:51 | 显示全部楼层
皮肤问题多多啊
添加toolbar用了皮肤会残留一点黑线
郁闷
发表于 2009-7-1 21:05:49 | 显示全部楼层
发表于 2009-7-2 08:39:43 | 显示全部楼层
留名等待进展
发表于 2009-7-23 16:52:49 | 显示全部楼层
刚刚学会用皮肤
发表于 2009-7-24 10:47:00 | 显示全部楼层
呵呵,有利有弊,自己衡量喽:)
发表于 2009-8-7 00:35:51 | 显示全部楼层
学习收藏 谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 23:37 , Processed in 0.081959 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表