滚动条始终保持在最下面加皮肤后无效了,请教
本帖最后由 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 = [["{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 = [["{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加皮肤代码打包
本帖最后由 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 = [["{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 本帖最后由 guang19831217 于 2011-4-7 20:08 编辑
纯.dll皮肤学了,有些可以,但限定比较多,不好用。.SKF皮肤全部试都会,望能指教.SKF皮肤的方法。 占个板凳,学习一下 本帖最后由 guang19831217 于 2011-4-8 12:33 编辑
{:face (356):} 终于把帖子改成已解决了。大大很厉害哦,谢谢了。
页:
[1]