Citation: Creado por Help Pre-Compiler, (C) Antonio Cordero


Overview

This program is FREEWARE so it can be copied freely. If you use it please name it in your helps.

When you press the New Topic button, you will be prompted for the name of the topic, you write it. Then you must fill the window with the text you want to be in that topic, with commands, etc (more on this later). You can fill the Title, Keywords, Macros, Map value and Browse ID/Index if you want.

Here is the main window:

Customizing the Help file

To customize the help file you must fill the Options window. Here it is:

Setting fonts & colors

When you have all the topics (not necessarily), you can change the fonts and colors of titles, subtitles, etc. First you have to select all the fonts and colors you want in the Fonts&Colors window. When you have done it, you can change the font and/or color of the selected text with the Insertions window. You must select font atributtes and/or color and check the checkboxes to insert the data you want, and then press the Set button. If you have not selected any text, the changes work for the text after them.

Here is the Fonts&Colors window (don't have hot-spots):

And the Insertions window:

Elige uno de estos temas:

  Commands

  Font & Color changes

  Graphics

  Important

  Next Version

  Credits


Topics
A topic is a bunch of data referencing the same thing. This line is a topic.


Title
The title is used to select the topic in the Search dialog after selecting a keyword.


Keyword
A keyword must be selected in the Search button dialog to select a title that selects a topic. When you select one, you must select the title you want among all topics that have the selected keyword.


Map Value
The map value is a number assigned to the topic, in your program you must call the WINHELP function with that value to select the topic. It is used to give Context Sensitive help.


Topic Commands

The commands that can be inserted in the text of a topic must start with a period and they can be only one per line.

.#	comment
.RTF rtf-commands	insert RTF commands (used by tables)
.INSTITLE	Insert the title with the font selected in the Options window
.FIXED	starts the non-scrolling region, it must be at the first paragraph
.NOFIXED	ends the non-scrolling region
.DEFAULTP	set default paragraph style
.DEFAULTF	set default font
.BITMAP file	insert a bitmap, the format can be BMP (Windows Bitmap), WMF (Windows Metafile), MRB (Multi Resolution Bitmap) or SHG (Bitmap with Hotpots). The Character Bitmap button in the Insertions window is equivalent but it can be inserted between text.
.BITMAPL file	insert a bitmap on the left side
.BITMAPR file	insert a bitmap on the right side
.LINDENT twips	set left margin
.RINDENT twips	set right margin
.FINDENT twips	set first line left margin
.PAR {rtf}	starts a more-than-one-line paragraph. If you put RTF statements, they will work for all the paragraph
.ENDPAR	ends the paragraph
.ROW {rtf}	starts a table row
.CELL	starts a table column
.ENDCELL	ends a table column
.ENDROW	ends a table row
.LINE x	changes the line style of paragraphs, the parameter must be: b (below), t (top), l (left), r (right)
.NOLINE	set default paragraph line style (no lines, equivalent to DEFAULTP)
.BOX	set paragraphs line style to box type
.NOBOX	sets default line style (like NOLINE and DEFAULTP)
.LINETYPE x	changes line type, the parameter must be: s (standard), db (double), dot (dots), th (thick)
.CJUST	center justify
.LJUST	left justify
.RJUST	right justify

The commands ROW/ENDROW, CELL/ENDCELL are inserted automaticaly with the button Table Template in the Insertions window. The commands that modify paragraph style dont do anything inside a PAR/ENDPAR structure. In the saved file could be other commands, but they can be found in the program controls. You can freely insert RTF commands in the text.

To make a link to other topic the format is (If you put a dash before the topic name it will appear in a popup window):

~words or graphics~[-]topic~

Example: ~jump to topic "topic"~-topic~

Appear as: jump to topic "topic"

If you want to assign macros to a link:

~words or graphics~!macros~

Example: ~about() macro~!about()~

Appear as: about() macro

You can also make a link with the Link button of the Insertions window.


Changes in font and color

This is the format of the inserted changes of font and color:

\fx	- change font, x is the font number of the list (0-based)

\fsxx	- change size, xx in half points

\bx	- change bold, x = 0 or nothing (for yes)

\ix	- change italic, x = 0 or nothing (for yes)

\ulx	- change underline, x=0 or nothing (for yes)

\cfx	- change color, x is the color number of the list (0-based). Color 0 is default.

Example: {\f1\fs60\b0\i\ul\cf1 Hello}

Should appear as: Hello

(supposing font 1 is Times New Roman and color 1 is Red)

Commands must end with a space.


Important

Special characters are { } ~ and \. If you want to insert them in the text you must precede them with the \ character, because they have special meanings to the RTF or HLPPCP formats.

A twip is an unit that equals 1/1440 inches.

While you are developing the help file set compression to off in the Options window. When it is finished turn it on.

CELL/ENDCELL acts as PAR/ENDPAR.


Browse ID/Index
The Browse ID and Index are used to move from one topic to the next in the same group, following an order. When you are on a topic and you press the << or >> buttons you will jump to the topic with the same Browse ID and with the previous/next Browse Index. The Browse ID should be a word, although not necessary, and the Browse Index must be a number between 0 and 999.


This is the topic list. When you select a topic from here, it appears in the window with his data.


Those buttons add, delete and change the name of a topic. When you change a topic name the name is changed in all the links, but not when you delete a topic.


Here you write the topic title if one exists. This topic can be inserted in the text with the INSTITLE command. It is used also to select the topic in the Search dialog.


Here you write the keywords with semicolons between them. If a keyword starts with letter K you must precede it with one space.


Here you write the Map Value. A program can select the topic if you know his map value.


Here are the Browse ID and Index. See above definition.


The font to be inserted.


The size to be inserted.


The attributes to be inserted. Bold, Italic and Underline.


Here you check the attributes that you want to insert.


This button inserts the selected attributes and returns to text.


Test of the font and attributes.


The color to be inserted.


Tests of the selected color on foreground and background.


This button inserts a bitmap at the text cursor. The bitmap selected must be on the same directory than the HPC file.


This button insert a table template that you must fill with the apropiate text. You will be prompted for the number of rows, columns, the end of columns and the left margin. Also you have to decide what kind of table you want: absolute or relative. Absolute tables will fix the text to the values entered as columns ends, but relative tables will adjust to the help window width.


This button returns you to the main window without inserting.


Here you write the Help File Title that appears on the help window title.


Here you must write the filename of the help file icon.


Here is the character set used in the help file. It must be Windows or Ansi or other if you paste text from other character set (from the clipboard for example).


Here must be the topic that appears first in the help window. If you keep this empty the first topic will be used.


Here you select the attributes of the titles inserted with the INSTITLE command.


Here you select the default font attributes.


Those options set the colors of the help window. The numbers must be 0-based and must exist in the color list of the Fonts&Colors window.


This button closes the window changing the data.


This button closes the window without changing any data.


This is a macro list. The macros written here will execute when you open the help file. You can add, delete and modify these macros.


Here you write the topic macros. They will execute when you display the topic. If you write more than one they must be divided by semi-colons.


Credits

 Help Pre-Compiler

This program has been written by Antonio Cordero with Visual Basic 2.0 Professional Edition, the program help has been created with the program. This program is mainly based on the Help Development Kit (HLPDK) by Loewy Ron.

I will be available on:

BBS "Las profundidades del Demoño" +34-1-7300942 (Co-Sysop Netdevil) (PREFERRED)

Internet mail address l0161@sobrino.eui.upm.es (To Netdevil)


On this list you select  the type of file which is created when compiling. This file contains constant definitions for the Map Values of the topics. Those constants will be the topic name preceded with "idh_". The file types are *.PAS (Turbo Pascal Unit), *.INC (Pascal Include), *.H (C/C++ Header), *.BAS (Basic Constant Globals).


This macros will execute when you select the topic.


Those parameters set the position and size of the help window.If you check the Maximize Windowcheckbox the help window will be maximized when you call it. If not checked, the position and size values must be filled. The coordinate system for this values is 0 to 1023, independently of the screen resolution. You must fill all four values or it will be an error.


When you press this button you must have some text selected (you can not press it without a selection). You will be prompted for a topic name or macro and the text selected will became a link to that topic. If you want a popup link, only precede the topic name with a dash, and if you want a macro, precede it with an exclamation.


Managing Graphics

If you want to insert a graphic you could have the next problems:

Problem	Solution
Graphic have an unsupported format	You must change its format to BMP
Graphic have more than 16 colors	You must reduce the number of colors to 16. And with the standard Windows palette. Save it with PaintBrush or use a program like Paint Shop Pro.
Graphic is 16 colors but appears with bad colors	You must change it to have the standard Windows palette

If you want to make a graphic with hot-spots, use the SHED.EXE (Hot-Sport editor) program. If you want a graphic that adjusts its resolution with the screen, use the MRB.EXE (Multiresolution Bitmap) program.


Those buttons opens the windows with their names.


Check this to compress the help file.


Next Version

The next version will probably have this and more features:

- Topic utilities (i.e. sort, search text)

- Secondary window support

- Help file style templates

- PreCompiler Macros

- Sizable window

- Standard button bitmaps