最新消息:

NsResize是NSIS改变或获取控件大小位置层次的插件

nsis 永恒心锁 1538浏览 0评论
/*
NsResize是NSIS改变或获取控件大小位置层次的插件
NsResize可以重新改变控件大小,并且获取控件坐标位置,NSResize可以像nsDialog一样增加控件.
例子是用定时器加数据函数然后通过插件改变位置而实现的动画.
*/
!AddPluginDir "../../Plugins"
!include MUI2.nsh
Name Circle
OutFile Circle.exe
RequestExecutionLevel user
!insertmacro MUI_PAGE_WELCOME
Page Custom CirclePage_Show
!insertmacro MUI_LANGUAGE English
Var Label
Function CirclePage_Show
 !insertmacro MUI_HEADER_TEXT `Circle` `Moves a label in a circle using a timer and absolute positioning`
 nsDialogs::Create 1018
 Pop $R0
 ${NSD_CreateLabel} 100% 100% 20u 20u ``
 Pop $Label
 SetCtlColors $Label 0x000000 0xFF0000
 StrCpy $R0 0
 ${NSD_CreateTimer} CirclePage_TimerTick 50
 nsDialogs::Show
 ${NSD_KillTimer} CirclePage_TimerTick
FunctionEnd
Function CirclePage_TimerTick
 Math::Script `R0 = R0 + 0.1; R1 = 140 + sin(R0) * 140; R2 = 55 + cos(R0) * 50`
 nsResize::Set $Label $R1u $R2u `` ``
FunctionEnd
Section
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » NsResize是NSIS改变或获取控件大小位置层次的插件

您必须 登录 才能发表评论!