Adding Browse and Search Buttons

To use browse sequences and full-text searching with Viewer, you must create a [CONFIG] section in your project file and insert commands that add the appropriate buttons to Viewer.

The [CONFIG] section must appear exactly as follows (you can copy this section from the USA.MVP file rather than typing it):

[CONFIG]
BrowseButtons()

RegisterRoutine("ftui", "InitRoutines", "SU")
InitRoutines(qchPath, 1)

RegisterRoutine("ftui","ExecFullTextSearch","USSS")
CreateButton("ftSearch","&Search","ExecFullTextSearch(hwndApp,qchPath,`',`')") 
RegisterRoutine("ftui","SwitchToTopicsFound","U")
AddAccelerator(0x46, 2, "SwitchToTopicsFound(hwndApp)")

Note the following elements in the [CONFIG] section:

The BrowseButtons command adds browse buttons to the player. If you don't want browsing capabilities in your title, omit this command from the project file.

The first RegisterRoutine command registers the InitRoutines command, which performs housekeeping tasks that support the full-text search software.

The second RegisterRoutine command and the CreateButton command add the Search button to the player and give the button full-text search capability. The RegisterRoutine command actually registers the dynamic-link library function for full-text searching, while the CreateButton command associates this function with the button. (To use the search DLL provided with Viewer, the button must be named “Search”.) If you don't want full-text searching capabilities in your title, omit these commands from the project file.

The third RegisterRoutine command registers the function for switching between the Topics Found window and the main Viewer window. The AddAccelerator command that immediately follows makes CTRL+F the accelerator key for doing this.