Delphi中帮助文件制作略谈

Delphi中帮助文件制作略谈
1、前期热身:
● 了解winhelp.exe文件的功能
winhelp.exe是windows提供的,它用来打开帮助文件*.hlp
● 制作帮助文件的源文件*.rtf
这部分可以用Microsoft Word来制作
● 创建帮助文件的项目文件*.hpj
可以使用字处理软件创建,其中包括编译帮助源文件时所需要的各种信息,形式是ASCII文件。
● 编译程序的用法
当帮助的源文件和项目文件建立好后,可以通过编译程序对其进行编译生成帮助文件*.hlp;delphi中的编译程序为delphi\help\tools\hcw.exe(hcrtf.exe)
● delphi应用程序中调用帮助文件

2、制作热浪:
● 帮助源文件的基本组成:
◆ 目录的主题——访问帮助信息的入口
◆ 下一子主题——由链接或者超图形进行主题之间的切换
● 主题的组成:
◆ 主题名——反映主题的内容
◆ 关键字——为了查询方便,指定一个或多个关键字
◆ 主题标识符——跳转的唯一标识
◆ 浏览顺序号——通过<< 或者 >>来查看不同的主题
◆ 正文——用户所需要的帮助信息
● 细节部分:
◆ 帮助文件中的控制符
控制符 含义
* 主题页的建立标志,其作用是可使用设计人员根据需要有条件地包括或排除主题页,不是帮助文件的必要部分
# 主题页的标识符,它定义了一个唯一的能标识主题页的字符串,在不同主题页之间的跳转就是通过它来实现的
$ 主题页名
+ 主题的浏览顺序号,用户通过浏览顺序号实现前翻或后翻。
K 主题页的关键字。当用户在帮助窗口中进行关键字搜索时,将显示关键字表,当用户选择了一个关键字后,即可以查到相关的主题页。
双下划线 跳转链接。若在帮助源文件中使用了双下划线(在帮助窗口中显示单下化线),就可以跳转到由主题页标识符指定的主题页。注意在双下划线后面必须加入隐藏的主题页标识符。
单下划线 说明链接。若在帮助源文件中使用了单下划线(在帮助窗口中显示点下划线),就可以弹出一个说明框。该说明框是单下划线后的隐藏标识符所指定的主题页。
隐藏文件 隐藏文字是跳转主题页的标识符,通过它实现链接间的跳转。

◆ 使用word制作*.rtf
这个就不用介绍了吧。
◆ 生成帮助文件
● 生成帮助文件

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
有原文有译文,下面是其一段: Original Integer types An integer type represents a subset of the whole numbers. The generic integer types are Integer and Cardinal; use these whenever possible, since they result in the best performance for the underlying CPU and operating system. The table below gives their ranges and storage formats for the current 32-bit Object Pascal compiler. Type Range Format Integer -2147483648..2147483647 signed 32-bit Cardinal 0..4294967295 unsigned 32-bit Fundamental integer types include Shortint, Smallint, Longint, Int64, Byte, Word, and Longword. Type Range Format Shortint -128..127 signed 8-bit Smallint -32768..32767 signed 16-bit Longint -2147483648..2147483647 signed 32-bit Int64 -2^63..2^63 signed 64-bit Byte 0.255 unsigned 8-bit Word 0.65535 unsigned 16-bit Longword 0..4294967295 unsigned 32-bit In general, arithmetic operations on integers return a value of type Integer which, in its current implementation, is equivalent to the 32-bit Longint. Operations return a value of type Int64 only when performed on an Int64 operand. Hence the following code produces incorrect results. var I: Integer; J: Int64; ... I := High(Integer); J := I + 1; To get an Int64 return value in this situation, cast I as Int64: ... J := Int64(I) + 1; For more information, see Arithmetic operators. Note: Most standard routines that take integer arguments truncate Int64 values to 32 bits. However, the High, Low, Succ, Pred, Inc, Dec, IntToStr, and IntToHex routines fully support Int64 arguments. Also, the Round, Trunc, StrToInt64, and StrToInt64Def functions return Int64 values. A few routines including Ord cannot take Int64 values at all. When you increment the last value or decrement the first value of an integer type, the result wraps around the beginning or end of the range. For example, the Shortint type has the range -128..127; hence, after execution of the code var I: Shortint; ... I := High(Shortint); I := I + 1; the value of I is -128. If compiler range-checking is enabled, however, this code generates a runtime error. Topic groups See also Numerals Ordinal types: Overview Real types 译文 整数类型 整数类型表示全部数字的子界。一般的整数类型是Integer和Cardinal,需要时,应当尽可能地使用这两种类型,因为它们在各种CPU和操作系统都提供最佳的性能。下面是当前32位Object Pascal编译器这两种整数类型的范围和存储格式: 类型 范围 格式 Integer -2147483648..2147483647 含符号的32位 Cardinal 0..4294967295 无符号的32位 基本整数类型包括Shortint、Smallint、Longint、Int64、Byte、Word、Longword等,如下: 类型 范围 格式 Shortint -128..127 含符号的8位 Smallint -32768..32767 含符号的16位 Longint -2147483648..2147483647 含符号的32位 Int64 -2^63..2^63 含符号的64位 Byte 0.255 无符号的8位 Word 0.65535 无符号的16位 Longword 0..4294967295 无符号的32位 通常,作用于整数的算术运算符返回Integer类型的值,在当前执行,等价于32位的长整型(LongInt)。仅当对Int64类型执行运算时,运算结果返回Int64类型。因此,下面的代码将执行后得到的结果是不正确的: var I: Integer; J: Int64; ... I := High(Integer); J := I + 1; 要使返回值是Int64类型,在上面的情况可以将 I 转换为Int64: ... J := Int64(I) + 1; 更多信息见算术运算符。 注意:大多数标准例程在处理Int64值的时候,都将参数截断为32位。不过,High、Low、Succ、Pred、Inc、Dec、IntToStr、IntToHex等例程完全支持Int64参数。此外,Round、Trunc、StrToInt64、StrToInt64Def等函数也可以返回Int64值。少数例程根本不能将Int64值作为参数,如Ord。 对于整数类型,当要递增最后一个值或要递减第一个值的时候,运算结果将在范围的起点和点之间环绕。例如,ShortInt类型的范围是 -128..127,因此,执行下面的代码: var I: Shortint; ... I := High(Shortint); I := I + 1; 之后,变量 I 的值为 –128。如果范围检查编译指示有效({$R+},缺省为{$R-}),那么上面的代码将产生一个运行时错误。 主题组 相关主题 数字 序数类型:概述 实数类型
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荣华富贵8

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值