Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SSW_8_11.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
5.22 Mб
Скачать

10. The system of help

10.1 The basic information on help structures

The interactive help, from the born was the part if Windows and it’s applications. But last time, the system of help got new possibilities and plays more important role. For example, in user interface of Windows’95 it has the extensive rile. If earlier it was possible to develop an application only with some details of interactive help. Now any program has to include the all of modern possibilities of commercially developed applications.

The system of help in Windows supports two basic types of help.

First of them is, really, the interactive documentation and, sometimes, is called tutorial help. It can be accessed by standard help window, called from menu Help. With such help there are can be displayed different sections of help, find any sections or view the contents of help file. Tutorial help is aimed to describe on details the applications properties and used as electronic version of user manual.

The second is context help. It makes a short description of some program characteristics, displaying in small window. The professionally developed applications use both the kinds of help.

The call of help

To implement all the properties of Window help system, any program need support the standard methods of user help call. For instance, user can get the help by one of four ways:

  1. On right mouse click on object;

  2. On “?” button click and after – on the required object.

  3. On “F1” button clicking.

  4. By “HELP” menu.

The first two kinds are always used to call the context help or tooltips. Sometimes, also F1-key is used to call the context help. But mainly, it’s for help system call. The Help menu is only to work with Help system.

There is accepted also that the program itself call on need the system of help. It’s possible, for instance, in cases, when user tries to act incorrectly.

In MFC, CWinApp class provides the help system functioning. When the user asks for help, the application automatically processes that query by WinHelp() function call of class CWinApp, or (in some cases by direct WinHelp() API-function call).

The file of help

The kernel of help system in Windows is help file. It’s used as for context help line as reference help. These files aren’t text. They are compiled in except mode and have *.HLP extension. To create help file, it’s need firstly to create the file of RTF (Rich text format), containing all the need sections in the formatted view with indexes and crossed links. That file has *.rtf extension and is compiled by compilers of help files. For example Microsoft Visual C++ has compiler HCW. The result of compiler work is HLP-file. So, relating to that compiler RTF-file is source, and HLP-file – the object.

In RTF-format, there are a lot of commands. The compiler of help files works only with part of them. Same time, the help system recognizes some help commands, not linked to RTF-format. All the RTF-commands begin with “\” symbol. For example “\b”-command means the bold marking of text.

Also, the help compiler uses the file of project. It sets the different settings and constants, relating to help file. The extension of project file is *.HPJ.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]