ceoguang 发表于 2009-1-16 16:23:13

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

如题,下面这段代码中,如何才能让进度条动起来?
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

ceoguang 发表于 2009-1-16 16:24:14

附皮肤,希望高手来帮帮忙!!!

sxd 发表于 2009-1-16 22:21:25

你的意思是 不加皮肤的时候是正常的 加了就不动了?

sanhen 发表于 2009-1-17 00:00:14

是的。这个问题不管加载任何皮肤都存在有此问题,有时间我研究看下。

ceoguang 发表于 2009-1-17 01:53:55

原帖由 sxd 于 2009-1-16 22:21 发表 http://www.autoitx.com/images/common/back.gif
你的意思是 不加皮肤的时候是正常的 加了就不动了?
是的,不加就能一直滚动,加了就不行!
原帖由 sanhen 于 2009-1-17 00:00 发表 http://www.autoitx.com/images/common/back.gif
是的。这个问题不管加载任何皮肤都存在有此问题,有时间我研究看下。
首先谢谢三恨,不过是在加载皮肤后才无法滚动,初步测试可能是式样的原因.

附不加载皮肤代码

;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 编辑 ]

kaiserchen 发表于 2009-6-22 14:20:11

路过 顶一下 皮肤还是要用用比较好

lynfr8 发表于 2009-6-22 16:00:51

皮肤问题多多啊
添加toolbar用了皮肤会残留一点黑线
郁闷

wlshra 发表于 2009-7-1 21:05:49

:face (3):

kn007 发表于 2009-7-2 08:39:43

留名等待进展

muxingwan 发表于 2009-7-23 16:52:49

刚刚学会用皮肤

menfan 发表于 2009-7-24 10:47:00

呵呵,有利有弊,自己衡量喽:)

songtao 发表于 2009-8-7 00:35:51

学习收藏 谢谢
页: [1]
查看完整版本: 请教关于使用SkinCrafterDll.dll调用皮肤后进度条问题