InstallShield 创建自己的Dialog
1.在“User Interface”-“Dialogs”下,在All Dialogs右击“New Dialogs…”创建自己的Dialogs。
2.在“Behavior and Logic”-“InstallScript”下,在Files右击“New Script File”创建相应函数
SdMakeName
if(MODE = SILENTMODE) then
SdMakeName(szAppKey, DLG_ENTERLOGIN, "", nDlgEnterLogin);
SilentReadData(szAppKey, "Result", DATA_NUMBER, szNil, nId);
if((nId != BACK) && (nId != CANCEL)) then
SilentReadData( szAppKey, "szUser", DATA_STRING, svUser, nNil );
SilentReadData( szAppKey, "szPass", DATA_STRING, svPassword, nNil );
endif;
return nId;
endif;SdMakeName ( svSection, szDlg, szUnused, nvDlgName );
svSection :Specifies the section name (for example, "MyDlg-0"). InstallShield places a value into this variable using the variables szDlg and nvDlgName. This value is used by SilentReadData and SilentWriteData.
svSection:指定这个名字是为了SilentReadData和SilentWriteData使用。
szDlg: Specifies the name of the custom dialog (for example, "MyDlg") for which to create a section name.
szDlg:变量的名字是自己创建的Dialog的名字。
szUnused:This parameter is not used; pass a null string ("") in this parameter.
szUnused:没有实质的作用,传入空字符就可以。
nvDlgName: Specifies the counter that records the number of times SdMakeName is called for the dialog named in szDlg. InstallShield automatically increments this counter.
For sections to be properly named, you must use a unique variable name in this parameter for each different custom dialog. A simple way to do this is to use the dialog name in szDlg to name the variable. For example, when szDlg is "MyDlgOne," name the variable in this parameter nvMyDlgOne, and when szDlg is "MyDlgTwo," name the variable nvMyDlgTwo.
nvDlgName:传入一个唯一的名字。(其实不太清楚)
Return Values
None.
SilentReadData
SilentReadData(szAppKey, "Result", DATA_NUMBER, szNil, nId);
//-----------------------------------我是注释,你不懂哥的寂寞------------------------------------------
SilentReadData (szSection, szValName, nValType, svVal, nvVal);
//个人认为第一次写这个是默认的,第二次是自己定义的。
szSection:
Specifies the name of the dialog data section in the .iss file. Do not include the square brackets ( [ ] ). The parameter szSection takes the form <functionname>-<number>, where <functionname> is the name of the dialog function as it is used in the script, and <number> is the number of the occurrence of that dialog in the script, beginning with 0 (zero). For example, the first occurrence of the MyDialog function dialog would have a value of "MyDialog-0" in szSection, the second occurrence "MyDialog-1," the third "MyDialog-2," and so on.
szSection:同SdMakeName中的第一个参数。
szValName:
Specifies the value name that appears in the dialog data section of the .iss file. Every dialog has at least one value for szValName—"Result"—which identifies the value returned by the dialog button controls (BACK, NEXT, OK, or CANCEL). Other value names are used to identify values and data associated with the other dialog controls.
szValName:指定在文件.iss中出现的内容。
nValType:
- DATA_STRING—The value assigned to the value name in szValName is of type STRING. Its value will be stored in svVal.
- DATA_NUMBER—The value assigned to the value name in szValName is of type NUMBER. Its value will be stored in nvVal.
- DATA_COMPONENT—The value assigned to the value name in szValName is the name of a component It will be stored in svVal.
- DATA_LIST—The value assigned to the value name in szValName is the list ID for an InstallScript list. It will be stored in nvVal.
nValType:
- DATA_STRING—字符串类型的保存在svVal中.
- DATA_NUMBER—整数类型的保存在svVal中.
- DATA_COMPONENT—.
- DATA_LIST—列表内容保存svVal中.
svVal:Specifies the value assigned to the value name in szValName when nValType is DATA_STRING or DATA_COMPONENT.
svVal:当nValType是DATA_STRING和DATA_COMPONENT时,把值保存在svVal中。
nvVal:Specifies the value assigned to the value name in szValName when nValType is DATA_NUMBER or DATA_LIST.
nvVal:当nValType是DATA_NUMBER和DATA_LIST时,把值保存在nvVal中。
CtrlSetText
#define RES_PBUT_BACK 12 // ID of Back button
#define RES_EDITNAME 301 // ID of edit box
#define RES_EDITCOMPANY 302 // ID of edit box
CtrlSetText (szDialogName, RES_EDITNAME, "Your name");
CtrlSetText (szDialogName, RES_EDITCOMPANY, "Your company");
CtrlSetText (szDialogName, nControlID, szText);
参数:
szDialogName指定一个对话框的名称。
nControlID指定其中的文本要被设置的单行编辑区,静态文本区或按扭控件的资源ID。
szText指定放到控件中的文本。返回值:
0:CtrlSetText成功设置控件中的文本。
< 0:CtrlSetText未能设置控件中的文本。
CtrlGetText
今天到这里,明天继续。。。。。
InstallShield 创建自己的Dialog的更多相关文章
- Installshield创建快捷方式不能正常运行的几种原因
Installshield软件提供创建快捷方式的功能,但是经常有朋友发现创建了以后快捷方式不能运行,在此列一下几种常见原因供各位朋友参考: 1. 没有选择相应的working directory,这种 ...
- easyUI 创建详情页dialog
使用easyui dialog先下载jQuery easyui 的压缩包 下载地址http://www.jeasyui.com/download/v155.php 解压后放在项目WebContent ...
- 创建多个Dialog时,namespace冲突问题的解决 -- 基于QT 5.2
问题来源: 我用MainWindow作为主界面,Dialog作为设置界面,还需要一个AboutDialog作为关于界面. 设置界面的Dialog头文件dialog.h是这样的: // dialog.h ...
- InstallShield 创建 visual studio 工程的时候 指向 任意 visual studio 版本 方法 (修改 计算机 默认 visual studio shell 版本)
这需要 修改 计算机 默认 visual studio shell 版本 注册表 HKEY_CLASSES_ROOT VisualStudio.DTE 配置节点 描述的是 默认的 visual stu ...
- Creating Dialogbased Windows Application (4) / 创建基于对话框的Windows应用程序(四)Edit Control、Combo Box的应用、Unicode转ANSI、Open File Dialog、文件读取、可变参数、文本框自动滚动 / VC++, Windows
创建基于对话框的Windows应用程序(四)—— Edit Control.Combo Box的应用.Unicode转ANSI.Open File Dialog.文件读取.可变参数.自动滚动 之前的介 ...
- InstallShield 一些事件说明
InstallShield 一些事件说明,和常量代码 大家可以把所有事件都点出来然后单步追踪就行了,我的经验是一般是从OnShowUI第一次显示UI界面开始,很容易就找到大家想处理的事件,另贴几个我发 ...
- Android 对话框(Dialog)大全 建立你自己的对话框
Android 对话框(Dialog)大全 建立你自己的对话框 原文地址: http://www.cnblogs.com/salam/archive/2010/11/15/1877512.html A ...
- 1. EasyUI 学习总结(一)——对话框dialog
文章参考来源:http://www.cnblogs.com/xdp-gacl/p/4075079.html 感谢博主的分享,写得非常精细,我在这边给看过的做一个记录. 一.EasyUI下载 使用eas ...
- Android中制作自定义dialog对话框的实例
http://www.jb51.net/article/83319.htm 这篇文章主要介绍了Android中制作自定义dialog对话框的实例分享,安卓自带的Dialog显然不够用,因而我们要继 ...
随机推荐
- Code Forces Gym 100886J Sockets(二分)
J - Sockets Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Valera ...
- 常用对象API、附加:集合补充
基本数据类型对象包装类: 为了方便操作基本数据类型值,将其封装成了对象,在对象中定义了属性和行为丰富了该数据的操作. 用于描述该对象的类就称为基本数据类型对象包装类. byte——Byte short ...
- (6/18)重学Standford_iOS7开发_控制器多态性、导航控制器、选项卡栏控制器_课程笔记
终于有时间跟新了,两周时间复(yu)习(xi)了5门考试累觉不爱...... ------------------------------------------------------------- ...
- 绘制3D的托卡马克位形图的matlab脚本文件 ThreeD.m
% 绘制3D的托卡马克位形图, (V 0.1 by Jiale Chan for Y. H. Huang) % Dee Formula % 特征参数 rzero = 2.0; rmax ...
- NPOI组件集锦
关于NPOI不错的介绍:http://www.cnblogs.com/restran/p/3889479.html http://www.cnblogs.com/Irving/archive/2012 ...
- Java IO流学习总结(转)
Java流操作有关的类或接口: Java流类图结构: 流的概念和作用 流是一组有顺序的,有起点和终点的字节集合,是对数据传输的总称或抽象.即数据在两设备间的传输称为流,流的本质是数据传输,根据数据传输 ...
- WIN32 根据程序名(映像名称)终止外部程序
场景: 1.有时候需要调用外部程序,但是外部程序有可能崩溃挂起,这样这个进程就没法结束,所以再在下次调用前需要先结束之前调用的. 2.没考虑到权限问题,应该是只能终止当前用户启动的进程. #inclu ...
- ThreadLocal 笔记
synchronized 同步的机制可以解决多线程并发问题,这种解决方案下,多个线程访问到的都是同一份变量的内容.为了防止在多线程访问的过程中,可能会出现的并发错误.不得不对多个线程的访问进行同步,这 ...
- 文件权限和目录权限详解(rwx)
[文件] r:可读,可以使用cat命令查看文件内容: w:可写,可以编辑或删除文件: x:可执行,可以当作命令提交给内核 [目录] r:可以对此目录执行ls,列出内部所有文件 w:可以在此目录创建文件 ...
- Linux下安装GAMS建模优化工具
1.下载GAMS wget http://d37drm4t2jghv5.cloudfront.net/distributions/24.5.6/linux/linux_x64_64_sfx.exe 2 ...