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的更多相关文章

  1. Installshield创建快捷方式不能正常运行的几种原因

    Installshield软件提供创建快捷方式的功能,但是经常有朋友发现创建了以后快捷方式不能运行,在此列一下几种常见原因供各位朋友参考: 1. 没有选择相应的working directory,这种 ...

  2. easyUI 创建详情页dialog

    使用easyui dialog先下载jQuery easyui 的压缩包  下载地址http://www.jeasyui.com/download/v155.php 解压后放在项目WebContent ...

  3. 创建多个Dialog时,namespace冲突问题的解决 -- 基于QT 5.2

    问题来源: 我用MainWindow作为主界面,Dialog作为设置界面,还需要一个AboutDialog作为关于界面. 设置界面的Dialog头文件dialog.h是这样的: // dialog.h ...

  4. InstallShield 创建 visual studio 工程的时候 指向 任意 visual studio 版本 方法 (修改 计算机 默认 visual studio shell 版本)

    这需要 修改 计算机 默认 visual studio shell 版本 注册表 HKEY_CLASSES_ROOT VisualStudio.DTE 配置节点 描述的是 默认的 visual stu ...

  5. 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.文件读取.可变参数.自动滚动 之前的介 ...

  6. InstallShield 一些事件说明

    InstallShield 一些事件说明,和常量代码 大家可以把所有事件都点出来然后单步追踪就行了,我的经验是一般是从OnShowUI第一次显示UI界面开始,很容易就找到大家想处理的事件,另贴几个我发 ...

  7. Android 对话框(Dialog)大全 建立你自己的对话框

    Android 对话框(Dialog)大全 建立你自己的对话框 原文地址: http://www.cnblogs.com/salam/archive/2010/11/15/1877512.html A ...

  8. 1. EasyUI 学习总结(一)——对话框dialog

    文章参考来源:http://www.cnblogs.com/xdp-gacl/p/4075079.html 感谢博主的分享,写得非常精细,我在这边给看过的做一个记录. 一.EasyUI下载 使用eas ...

  9. Android中制作自定义dialog对话框的实例

    http://www.jb51.net/article/83319.htm   这篇文章主要介绍了Android中制作自定义dialog对话框的实例分享,安卓自带的Dialog显然不够用,因而我们要继 ...

随机推荐

  1. Staitic(静态) 相关知识点介绍

    一.什么是 Static? Static 关键字:表明一个成员变量或者是成员方法可以在没有所属的类的实例的情况下直接被访问 当成员被静态修饰后,就多了一个调用方式,除了可被对象调用外还可以直接被类名调 ...

  2. 在地图上添加POI

    使用Tangram的Marker, 可以在地图上做各种标记, 效果图: Tangram是通过Marker在地图上添加标记的,Marker分Point, Polyline和Polygon三种, 分别对应 ...

  3. Keepalived+Nginx+Tomcat配置高可用负载均衡系统示例

    前言 此示例为keepalived+nginx+tomcat的基础配置示例,某些特定配置此例中不会出现,在示例中会用到三个虚拟机:两个纯命令行用于模拟服务端配置,一个带桌面环境的用于模拟客户端访问,这 ...

  4. Android(java)学习笔记175:BroadcastReceiver之 外拨电话的广播接收者

    首先我们示例工程一览表如下: 1.首先我们还是买一个收音机,定义一个OutCallReceiver继承自BroadcastReceiver,onReceive()方法中定义了监听到广播,要执行的操作: ...

  5. MVC缓存,使用数据层缓存,添加或修改时让缓存失效

    在"MVC缓存01,运用控制器缓存或数据层缓存"中,在数据层中可以设置缓存的有用时刻.但这个还不够"智能",常常期望在修改或创立的时分使缓存失效,加载新的数据. ...

  6. 【Android】数据库的简单应用——增删改查的操作

    还记得getReadableDatabase()和getWritableDatabase()方法吧?在调用它们的时候会返回一个SQLiteDatabase对象,借助这个对象就可以进行CURD(Crea ...

  7. ubuntu 12.04 编译安装 nginx

    下载源码包 nginx 地址:http://nginx.org/en/download.html 编译前先安装两个包: 直接编译安装会碰到缺少pcre等问题,这时候只要到再安装两个包就ok sudo ...

  8. Cracking the coding interview

    写在开头 最近忙于论文的开题等工作,还有阿里的实习笔试,被虐的还行,说还行是因为自己的水平或者说是自己准备的还没有达到他们所需要人才的水平,所以就想找一本面试的书<Cracking the co ...

  9. Linux下安装并破解StarUML

    下载 官网地址: http://starumlreleases-7a0.kxcdn.com/v2.7.0/StarUML-v2.7.0-64-bit.deb CSDN: http://download ...

  10. 免费的手机号码归属地查询API接口文档

    聚合数据手机号码归属四查询API接口,根据手机号码或手机号码的前7位,查询手机号码归属地信息,包括省份 .城市.区号.邮编.运营商和卡类型. 通过链接https://www.juhe.cn/docs/ ...