找回密码
 加入
搜索
查看: 4657|回复: 4

[AU3基础] 滚动条始终保持在最下面加皮肤后无效了,请教

[复制链接]
发表于 2011-4-7 20:00:09 | 显示全部楼层 |阅读模式
悬赏30金钱已解决
本帖最后由 guang19831217 于 2011-4-8 12:25 编辑

学习Edit编辑框中滚动条始终保持在最下面时,如果加了皮肤就不能保持最下面了,望高手指教,要.skf的加皮肤方法!

不加皮肤代码如下
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 64, 24, 457, 225, BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY))
GUICtrlSetFont(-1, 15, 800, 0, "宋体")
$Input1 = GUICtrlCreateInput("请在此输入:", 64, 272, 457, 21)
$Button1 = GUICtrlCreateButton("Button1", 440, 344, 89, 25)
GUISetState(@SW_SHOW)
$dll = DllOpen("user32.dll")
Dim $AccelKeys[1][2] = [["{Enter}", $Button1]]
GUISetAccelerators($AccelKeys)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        If GUICtrlRead($Input1) = "" Then
                                MsgBox(0, "", "空的?")
                                                        Else
                                                                For $i = 1 To 100
                        $str = GUICtrlRead($Input1)
                        _GUICtrlEdit_AppendText($Edit1,$i & ".     " & $str & @CRLF)
                        Next
                                                EndIf
        EndSwitch
WEnd
加皮肤代码如下
$mainwindow = GUICreate("测试", 336, 238) ;调用皮肤
_SkinGUI("SkinCrafterDll.dll", "SleekAlpha.skf", $mainwindow)

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   ;==>_SkinGUI

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 64, 24, 457, 225, BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY))
GUICtrlSetFont(-1, 15, 800, 0, "宋体")
$Input1 = GUICtrlCreateInput("请在此输入:", 64, 272, 457, 21)
$Button1 = GUICtrlCreateButton("Button1", 440, 344, 89, 25)
GUISetState(@SW_SHOW)
$dll = DllOpen("user32.dll")
Dim $AccelKeys[1][2] = [["{Enter}", $Button1]]
GUISetAccelerators($AccelKeys)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        If GUICtrlRead($Input1) = "" Then
                                MsgBox(0, "", "空的?")
                                                        Else
                                                                For $i = 1 To 100
                        $str = GUICtrlRead($Input1)
                        _GUICtrlEdit_AppendText($Edit1,$i & ".     " & $str & @CRLF)
                        Next
                                                EndIf
        EndSwitch
WEnd
加皮肤代码打包
附件: 您需要 登录 才可以下载或查看,没有账号?加入

最佳答案

查看完整内容

回复 3# kadingxiaodi 一个折中的办法,将就用吧
发表于 2011-4-7 20:00:10 | 显示全部楼层
本帖最后由 guland 于 2011-4-8 11:41 编辑

回复 3# kadingxiaodi

一个折中的办法,将就用吧
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Edit1 = GUICtrlCreateEdit("", 64, 24, 457, 225, BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY, $ES_AUTOVSCROLL))
_SkinGUI("SkinCrafterDll.dll", "SleekAlpha.skf", $Form1)
GUICtrlSetFont(-1, 15, 800, 0, "宋体")
$Input1 = GUICtrlCreateInput("请在此输入:", 64, 272, 457, 21)
$Button1 = GUICtrlCreateButton("Button1", 440, 344, 89, 25)
GUISetState(@SW_SHOW)
$dll = DllOpen("user32.dll")
Dim $AccelKeys[1][2] = [["{Enter}", $Button1]]
GUISetAccelerators($AccelKeys)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        If GUICtrlRead($Input1) = "" Then
                                MsgBox(0, "", "空的?")
                        Else
                                For $i = 1 To 100
                                        $str = GUICtrlRead($Input1)
                                        GUICtrlSetData($Edit1, $i & ".     " & $str & @CRLF, 1)
                                Next
                        EndIf
        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   ;==>_SkinGUI

评分

参与人数 1金钱 +30 收起 理由
guang19831217 + 30 谢谢,很厉害哦

查看全部评分

 楼主| 发表于 2011-4-7 20:04:18 | 显示全部楼层
本帖最后由 guang19831217 于 2011-4-7 20:08 编辑

纯.dll皮肤学了,有些可以,但限定比较多,不好用。.SKF皮肤全部试都会,望能指教.SKF皮肤的方法。
发表于 2011-4-7 20:58:31 | 显示全部楼层
占个板凳,学习一下
 楼主| 发表于 2011-4-8 12:15:04 | 显示全部楼层
本帖最后由 guang19831217 于 2011-4-8 12:33 编辑

终于把帖子改成已解决了。大大很厉害哦,谢谢了。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-12 11:09 , Processed in 0.087023 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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