安装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. iOS代码实现九宫格

    #define ScreenW [UIScreen mainScreen].bounds.size.width #define ScreenH [UIScreen mainScreen].bounds ...

  2. (转)oracle中用户删除不了,ORA-01940提示 “无法删除当前已连接用户”

    Oracle删除用户的提示无法删除当前已连接用户两种解决方法如下: 1.先锁定用户.然后查询进程号,最后删除对应的进程.在删除对应的用户 SQLalter user XXX account lock; ...

  3. [技巧.Dotnet]轻松实现“强制.net程序以管理员身份运行”。

    使用场景: 程序中不少操作都需要特殊权限,有时为了方便,直接让程序以管理员方式运行. (在商业软件中,其实应该尽量避免以管理员身份运行.在安装或配置时,提前授予将相应权限.) 做法: 以C#项目为例: ...

  4. MongoDB 知识要点一览

    1.启动mongoDb数据库: 进入mongoDB的安装目录,执行如下命令 C:\Program Files\MongoDB\Server\3.0\bin>mongod.exe --dbpath ...

  5. 用OMT方法建立其分析模型: 本大学基于网络的课程注册系统。

    OMT方法是用3种模型来描述软件系统,分别是对象模型,动态模型,功能模型. 1)对象模型:课程网络注册系统 2)动态模型:序列图 3)功能模型:数据流图 0层DFD图 1层DFD图

  6. Unix权限管理

    // */ // ]]> Unix权限管理 Table of Contents 1 Unix权限管理 2 进程权限 3 文件权限 4 进程对文件的存取访问的权限校验过程 1 Unix权限管理 权 ...

  7. 使用Scala实现文件单词计数

    package com.dtapp.base import scala.io.Source object WCntApp { def main(args: Array[String]) { val f ...

  8. (python)图片处理Pillow模块的使用

    Pillow中最重要的类就是Image,该类存在于同名的模块中.可以通过以下几种方式实例化:从文件中读取图片,处理其他图片得到,或者直接创建一个图片. 还有一个类为ImageDraw,用来画图. 1. ...

  9. (python) 标准模块sys和os的使用

    一.sys模块 包含了系统的相关的功能.我们来学习sys.argv,它包含命令行参数. 例子:定义了一个add函数,用来实现两个整数的相加. #! coding=utf-8 # usersys.py ...

  10. nginx url 重写

    rewrite ^([^\.]*)/platform/(.+)/(.+)-(.+)\.html$ $1/platform.php?mod=asklist&ym=$2&fl=$3& ...