安装Inno Setup时如果选择了水波效果插件(如下图),将在Inno Setup的安装目录下自带有水波特效的例子,如路径:C:\Program Files (x86)\Inno Setup 5\Examples\下的WaterLib_Example.iss。

  

  

  以下是我在原例子的基础上修改得到的非增强版可用的精简代码:

 ; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
#include "compiler:WaterLib.iss" #define MyAppName "我的程序"
#define MyAppVersion "1.5"
#define MyAppPublisher "我的公司"
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe" [Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{F40EA292-5A4E-41EB-9819-7D426D45A468}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=WaterExp
Compression=lzma
SolidCompression=yes
DisableWelcomePage=no
WizardImageFile=compiler:WizModernImage-Is.bmp
WizardSmallImageFile=compiler:WizModernSmallImage-Is.bmp
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl" [Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files]
;Source: "C:\Program Files (x86)\Inno Setup \Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: compiler:InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy noencryption
;Source: demo.bmp; DestDir: {tmp}; Flags: dontcopy noencryption
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion” [Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Code] Const
DrawTextMoveDemo = '动态移动演示'; type
TTimerProc = procedure(H: LongWord; MSG: LongWord; idEvent: LongWord; dwTime: LongWord);
function WrapTimerProc(CallBack: TTimerProc; ParamCount: Integer): LongWord; external 'InnoCallback@files:InnoCallBack.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall'; var
MoveB_X, MoveT_Y: Integer;
DrawBitmapDemo: TBitmap;
WaterHandle:Integer; procedure MyTimerProc(H: LongWord; MSG: LongWord; idEvent:LongWord; dwTime:LongWord);
begin
MoveT_Y := MoveT_Y + ;
If MoveT_Y >= WizardForm.WizardBitmapImage.Height then MoveT_Y := ;
WaterDrawText(WaterHandle, , , MoveT_Y, DrawTextMoveDemo); MoveB_X := MoveB_X + ;
If MoveB_X >= WizardForm.WizardBitmapImage.Width then MoveB_X := - DrawBitmapDemo.Width;
WaterDrawBitmap(WaterHandle, , MoveB_X, , DrawBitmapDemo.Handle, True, clDefault);
end; procedure InitializeWizard();
var
F: AnsiString;
TimerCallBack: LongWord;
begin
WaterSupportAuthor(True);
//支持本人作品, 建议开启标识显示.
//只有开启该功能后, 才可以使用WaterDraw****相关API的功能 //创建水波特效
F:= ExpandConstant('{tmp}\WizardImage.bmp');
WizardForm.WizardBitmapImage.Bitmap.SaveToFile(F);
WaterHandle := WaterInit(WizardForm.WelcomePage.Handle, , );
WaterSetBounds(WaterHandle, WizardForm.WizardBitmapImage.Left, WizardForm.WizardBitmapImage.Top, WizardForm.WizardBitmapImage.Width, WizardForm.WizardBitmapImage.Height);
WaterSetFile(WaterHandle, AnsiString(F));
WaterSetActive(WaterHandle, True);
DeleteFile(F); //竖向移动的文本
MoveT_Y := ;
WaterDrawTextBrush(WaterHandle, , clBlack, bsClear);
WaterDrawTextFont(WaterHandle, , '宋体', , clYellow, );
WaterDrawText(WaterHandle, , , MoveT_Y, DrawTextMoveDemo); //横行移动的位图
MoveB_X := ;
DrawBitmapDemo:= TBitmap.Create;
DrawBitmapDemo.LoadFromFile(ExpandConstant('{commonappdata}\Microsoft\User Account Pictures\guest.bmp'));
//ExtractTemporaryFile('demo.bmp');
//DrawBitmapDemo.LoadFromFile(ExpandConstant('{tmp}\demo.bmp'));
WaterDrawBitmap(WaterHandle, , MoveB_X, , DrawBitmapDemo.Handle, True, clDefault); //创建动态显示文本或位图的定时器
TimerCallBack := WrapTimerProc(@MyTimerProc, );
SetTimer(, , , TimerCallBack);
end; procedure CurPageChanged(CurPageID: Integer);
begin
Case CurPageID of
wpWelcome : WaterSetParentWindow(WaterHandle, WizardForm.WelcomePage.Handle); //将水波移动到另一个句柄上
wpFinished: WaterSetParentWindow(WaterHandle, WizardForm.FinishedPage.Handle); //将水波移动到另一个句柄上
end;
end; //释放所有水波对象
procedure DeinitializeSetup();
begin
WaterAllFree;
end;

效果如下:

inno 实现水波特效的更多相关文章

  1. matlab练习程序(水波特效)

    还记得原来写过一个对图像进行波纹扭曲操作的博文. 这次实现的是水波特效,其实就是通过正余弦函数表示波纹中心位置慢慢向外扩散,通过叠加衰减因子使振幅不断减小,进而产生水波的效果. 效果如下: 原图: 波 ...

  2. 一款基于jquery实现的鼠标单击出现水波特效

    今天要为大家绍一款由jquery实现的鼠标单击出现水波特效.用鼠标猛点击页面,你可以看到页面不断出面水波纹效果.然后水波纹渐渐消失.效果非常不错.我们一起看下效果图: 在线预览   源码下载 实现的代 ...

  3. Python: PS 滤镜--水波特效

    本文用 Python 实现 PS 滤镜中的 水波特效 import numpy as np from skimage import img_as_float import matplotlib.pyp ...

  4. cocos2d-x 动画特效集合

    转自:http://www.cnblogs.com/linux-ios/archive/2013/04/09/3009292.html 备用 bool HelloWorld::init() { /// ...

  5. Android特效专辑(十一)——仿水波纹流量球进度条控制器,实现高端大气的主流特效

    Android特效专辑(十一)--仿水波纹流球进度条控制器,实现高端大气的主流特效 今天看到一个效果挺不错的,就模仿了下来,加上了一些自己想要的效果,感觉还不错的样子,所以就分享出来了,话不多说,上图 ...

  6. WebGL——水波纹特效

    大家好,今天我ccentry要做一个水波纹特效,我们来看看水波纹特效的做法.首先我们来看一下水波纹特效的效果是怎么样的,请看下图. 我们要做的就是类似这种纹理特效,那么我们来看看是如何制作的吧.首先鲫 ...

  7. cocos2dx动画常见特效(转)

    本文转载自:http://www.cnblogs.com/linux-ios/archive/2013/04/09/3009292.html bool HelloWorld::init() { // ...

  8. Cocos2d-X中的动作特效

    Cocos2d-X中提供了很丰富的动作特效 比如:网格动画 扭曲特效 3D瓷砖波动特效 程序代码: #include "ActionEffect.h" #include " ...

  9. 2.CCGridAction(3D效果),3D反转特效,凸透镜特效,液体特效,3D翻页特效,水波纹特效,3D晃动的特效,扭曲旋转特效,波动特效,3D波动特效

     1 类图组织 2 实例 CCSprite * spr = CCSprite::create("HelloWorld.png"); spr->setPosition(cc ...

随机推荐

  1. java 的面向对象

    1.java是什么语言: java也属于面向对象编程语言. 2.面向对象的三大特性: 封装 ,继承, 多态. 3.什么是对象: 对象是真实存在的唯一失误. 面向对象的英文是(oop),面向对象的编程思 ...

  2. AndroidStudio关联svn并上传代码到svn服务器上

    打开AndroidStudio,按Ctrl+Shif+S快捷键,进入Settings设置页面.如上图所示,找到Version Control->点击Subversion->右边框口中勾选U ...

  3. 如何将数据库中的表导入到PowerDesigner中

    1.        打开PowerDesigner12,在菜单中按照如下方式进行操作file->Reverse Engineer->DataBase 点击后,弹出 New Physical ...

  4. ASI 与 AFN

    HTTP终结者.功能十分强大. 基于底层的CFNetwork框架,运行效率很高. 可惜

  5. 一次诡异的TOMCAT启动故障的解决

    该系统采用TOMCAT+SSH+Linux+Proxool连接池, 以前数据库是本地连接. 后换数据库远端连接,最近老是启动不了. 1.怀疑是proxool连接池没有自动断开后恢复.尝试解决,不是这个 ...

  6. PHP高并发高负载系统架构

    PHP高并发高负载系统架构 1.为什么要进行高并发和高负载的研究 1.1.产品发展的需要 1.2.公司发展的需要 1.3.当前形式决定的 2.高并发和高负载的约束条件 2.1.硬件 2.2.部署 2. ...

  7. Error:SSL peer shut down incorrectly

    从别的地方拷贝过来的项目有时会报这个错误,解决方法 File -> Project Structure -> project 对比本地项目和拷贝项目并修改至与本地项目一致

  8. Python中获取异常(Exception)信息

    异常信息的获取对于程序的调试非常重要,可以有助于快速定位有错误程序语句的位置.下面介绍几种python中获取异常信息的方法,这里获取异常(Exception)信息采用try...except...程序 ...

  9. [09]APUE:进程关系

    [a] getpgid / setpgid #include <unistd.h> pid_t getpgid(pid_t pid) //成功返回进程组 ID,出错返回 -1 int se ...

  10. oc数据类型

    数据类型:基本数据类型.指针数据类型 基本数据类型:数值型.字符型(char).布尔型.空类型(void)指针数据类型:类(class).id数值型:整数类型int.浮点型float.doublec和 ...