Copyright: Herd Software Development 1995-96


THWaterMark() parameter helper

 Position  [image] Palette [image] Coordinated

Watermark position chart

 Note: “1” as the last digit indicates that the watermark is to be displayed in one topic only.  To display the watermark globally (or for all subsequent topics until THWaterMark() is executed again) use “0” as the last digit of the parameter.

	Left	Center	Right
Top	0x0011	0x0021	0x0031
Middle	0x0111	0x0121	0x0131
Bottom	0x0211	0x0221	0x0231
0x0nnn: Display tiled in the scrolling region of the topic

0x1nnn: Display as a non-scrolling watermark
(watermark remains stationary when scrolling)

0x2nnn: Wrap window to the watermark’s dimensions
(do not apply other subparameters)

0x4nnn: Ignore size changes when positioning
(For pane effects.  Not supported...use at your own risk.)

0x8nnn: Display in parent window only
(For pane effects.  Not supported...use at your own risk.)

Remove watermark (or apply background color control only): empty quotes (`') as fourth parameter, any valid value (e.g. 0x0001) as fifth parameter.

Background color charts

These two tables represent a short list of recommended standard background colors for use with the background color control feature of THWaterMark().  Hotspots are live and will activate the selected color in this window.

Blue (0xFF0000)	Lime (0x00FF00)	Red (0x0000FF)
Aqua (0xFFFF00)	Fuchsia (0xFF00FF)	Yellow (0x00FFFF)
Maroon (0x000080)	Navy (0x800000)	Teal (0x808000)
Green (0x008000)	Olive (0x008080)	Purple (0x800080)
Silver (0xC0C0C0)	Gray (0x808080)	Black (0x000000)
White (0xFFFFFF)	Orange (0x0080ff)	Blue-white (0xFF8080)
Green-white (0x80FF00)	Yellow-white (0x80FFFF)	Aqua-white (0xFFFF80)
Off-white (0xE8FFFF)	Ergonomic paper 1 (0xC0FFC0)	Ergonomic paper 2 (0xC0FFFF)
Windows desktop color coordinator

These background color values must be used with extreme care when applying specific colors (e.g. black) to your topic text.  The hexadecimal (“0x”) values  in brackets are substituted for 0xXXXXXX in your THWaterMark() macro.

Scroll bar (0x10000000)	Desktop background (0x10000001)	Active window caption (0x10000002)
Inactive window caption (0x10000003)	Menu bar background (0x10000004)	Window background (0x10000005)
Window frame (0x10000006)	Menu text (0x10000007)	Window text (0x10000008)
Caption text (0x10000009)	Active window border (0x100000a)	Inactive window border (0x1000000b)
Application workspace (0x1000000c)	Highlighted region (0x1000000d)	Highlighted text (0x1000000e)
Button face (0x1000000f)	Button shadow (0x10000010)	Disabled menu item (0x10000011)
Button highlight (0x10000012)


Windows transparent color palette reference chart


THWaterMark() window sizing reference

This chart uses 36 custom ThinHelp window sizing macros to display 30 preset window sizes as a guide for layouts.  Heights in these samples are restricted to 420 pixels to insure consistently accurate display in large font mode on 640x480 displays.  In order to properly test performance, move the reference card window around on the screen prior to executing the macro to test its effects based on the screen position of your window, and try each window size you plan to use from a ThinHelp macro in at least two screen resolutions (640x480 should be one of the two) prior to distributing your Help.

200x200

200x250

200x300

200x350

200x400

200x420

250x200

250x250

250x300

250x350

250x400

250x420

300x200

300x250

300x300

300x350

300x400

300x420

350x200

350x250

350x300

350x350

350x400

350x420

400x200

400x250

400x300

400x350

400x400

400x420

450x200

450x250

450x300

450x350

450x400

450x420

500x300

550x350

500x400

550x420


ThinHelp Quick Reference (main menu)
ThinHelp Quick Reference

  Embedded window statement reference

  ThinHelp custom macro function reference

  Miscellaneous functions and extras

  Tools, charts and utilities

This section preassumes a fairly strong grasp of WinHelp or Viewer authoring concepts.  Consult the associated tutorial sections for more detailed help with these functions and features.


ThinHelp Quick Reference (embedded window statement menu)
ThinHelp Quick Reference

  Embedded window statement reference

  Embedded window statements (general)

  THIN embedded window syntax

  THREGISTER embedded window syntax

  ThinHelp bitmap limits

  ThinHelp custom macro function reference

  Miscellaneous functions and extras

  Tools, charts and utilities


ThinHelp Quick Reference (custom macro menu)
ThinHelp Quick Reference

RegisterRoutine() and template macros can be copied to the clipboard for insertion into your project’s source files using the Copy buttons in the associated topics.  No copy-to-clipboard is supported for the abbreviated expert mode” macros.

  Embedded window statement reference

 ThinHelp custom macro function reference

  THWatermark()

  THRGB()

  THSndPlaySound()

  THSetAnimationSpeed()

  THShellExecute()

  THFileExist()

  THMessageBox()

  THMoveWindow()

  THStringToClipboard()

  THIsWIN32()

  THTestLicenseKey()

  THTestLicenseKey()

  THSetCacheSize()

  Miscellaneous functions and extras

  Tools, charts and utilities


ThinHelp Quick Reference (miscellaneous functions menu)
ThinHelp Quick Reference

  Embedded window statement reference

  ThinHelp custom macro function reference

  Miscellaneous functions and extras

  LHAExpand() (HLPLHA.DLL)

  SHG graphic import filtering

  View sample APPSETUP.INF file

  Tools, charts and utilities


ThinHelp Quick Reference (tools, charts and utilities menu)
ThinHelp Quick Reference

  Embedded window statement reference

  ThinHelp custom macro reference

  Miscellaneous functions and extras

  Tools, charts and utilities

  Transparency index chart

  Background color chart

  Watermark bitmap positioning chart

  Window sizing reference

  Window sizing reference


Embedded window statements (general)

{ ewc }	Embedded window as character (inline; text is level with or flows beneath bitmap; formatted by Help the same way as a typed character of the dimensions of the bitmap)
{ ewr }	Embedded window right (text flows around embedded window to left)
{ ewl }	Embedded window left (text flows around embedded window to right)


THIN embedded window syntax

Clicking individual parameters will pop up explanations of their meanings.

{ ewx MODULENAME or FILENAME, WINDOWCLASS, [+|!]ARCHIVENAME.EXTENSION; FILENAME;[palette1]/[palette2]/ [displaytype]/ [advanceinterval]/R/G/B;;MACRO()}

MODULENAME: Mandatory.  Prefix of DLL file (usually) or module name (actual modulename or filename  prefix used in any RegisterRoutine() macros).  Upper case recommended.

WINDOWCLASS: Mandatory.  Internal name of the class for the embedded window type used by the DLL.  For embedded windows this is THIN.  The THREGISTER class is only used for testing registration key features.  Upper case is recommended.

ARCHIVENAME.EXTENSION: Conditional.  If JPEGs are included in baggage as unarchived files then an archive filename is not needed.  Otherwise, this is the filename of the LZH-compressed archive containing the bitmap(s) to be displayed.  Archive names do not require the .LZH extension however archives must be LZH-compressed using the -h0 (header level=0) switch with LHA.EXE or a compatible archiver.  Filenames must be preceded by a ! if archive is included in baggage; filename must be complete; no wildcard or filemask support.  Must match case used in [BAGGAGE] statement for baggaged archive files; otherwise case insensitive.  Upper case is recommended.

FILENAME: Mandatory.  Name of bitmap file(s) to be displayed.  Partial filenames act as wildcards for displaying animations, segmented embedded bitmaps, etc.  ThinHelp does not recognize DOS wildcard characters (? and *).  Full filename preferred for simple embedded window statements.  Must match the case used to reference the archive in the [BAGGAGE] statement of the project file for baggaged JPG files, otherwise case-insensitive.  Upper case is strongly recommended.  If a .BMP or .SHG is used a semicolon must be inserted between the archivename and filename.

SUBPARAMETERS OF THE DISPLAY PROPERTIES PARAMETER: Optional.  Up to seven subparameters are allowable.  Syntax: n1/n2/n3/n4/R/G/B.  May be truncated (e.g. if only the first two subparameters are needed, then the last five may be omitted.)

n1:  Custom palette definition, single digit.  Indicates number of shades of red, green, blue to be used in determining palette size for the specific bitmap; e.g. 6 is 6^3 or 216 total colors.  Valid range: 2-6.  Colors assigned are derived from the standard 256 color palette on the target system.

n2:  Extra colors reserved for this bitmap.  E.g. 15 reserves 15 extra colors for this bitmap regardless of first parameter.  Valid range: dependent on n1, may be 0, never greater than 236-n1 [image].

n3:  Animation and display options switch.  This value is calculated as a word as opposed to a single variable and can have several options or combinations of options.  Single options include:

0 	(loop endlessly)

1 	(play once)

2 	(display bitmap as a depressable button if a macro is included in the embedded window statement or display as raised bitmap if no macro)

4 	(display a metafile over last bitmap in the sequence)

8 	(show scroll bar)

16 	(auto-start animation by clicking the embedded window)

32 	(don’t allow printing for this embedded window...usually used for buttons)

These can be combined into multiple-function switches.  Examples: 3 (2+1, play once and display as button), 21 (16+4+1=start animation by clicking, play once, and display metafile over last frame).  Range: any sum of integers 0, 1, 2, 4, 8, 16 and 32.

n4:  Animation frame advance rate in milliseconds.  Default: 300.  Valid range: low end dictated by graphics hardware and bitmap size...values below 30 are usually ineffective in improving display quality.  Upper limit unknown.  Values of 9000000 (two and a half hours) have been tested and can be used to effectively stop” animation.  Multiple icon animations as rapid as 30 frames per second (35ms) have also been tested and found to be reliable on 486-DX2 and higher systems.  Frame advance may be sluggish or jerky with large animations on low-memory 386 systems due to the computational load of frequent screen updates.

R/G/B: Red/Green/Blue indices for transparent color.  Range: 0, 128, 192 or 255.  Authored R/G/B values must comply with a standard 16 color Windows palette color.  See the palette index chart for valid colors and their values.  Performance improvement can be achieved using black (0/0/0) as the transparency index, but this comes at the expense of a degree of flicker.

MACRO: Optional.  May follow bitmap filename or parameter set but must be preceded by two semicolons, not one.  Value: WinHelp macro.  Range: Any valid macro in the WinHelp macro set or any custom macro registered in the [CONFIG] section of the HPJ/MVP file.  All ,” characters must be replaced by ~” characters (e.g. JI(qchPath~`mainmenu') or JI(`myhelp.hlp>supplementary_window'~`supp_topic'))

Macros must always be preceded by at least two semicolons.  If no display properties are assigned, three are required.  If the image is a default animation or a single bitmap in an archive with no display properties and no filename is used, four preceding semicolons are required.

The reserved parameter is in place to permit future additions to ThinHelp’s functionality.  Please fill out the survey and wish list in THINHELP.HLP to help us decide what functionality to add to this parameter.


THREGISTER embedded window syntax

{ ewx THNHLP,THREGISTER,THINHELP/NAME/SNR }

Function: Testing or display of ThinHelp values in the registry.

Options: None.

Suggested uses: Testing only.  Designed to permit easy viewing of the current status of ThinHelp registry keys.  Can be used as a registration key check control if no RegisterRoutine() macro slots are available in the project for THTestLicenseKey().


THWatermark() macro syntax

This is the most complex macro used by ThinHelp and controls up to three separate functions simultaneously.  Be sure to consult THINHELP.HLP for additional information regarding the application of this macro.  Additional references are available for the display parameters.

Functions: This macro controls three separate functions:

1. Applies bitmaps (BMP or JPG) as tiling background watermark textures in Help and Viewer loadable from a compressed archive located either inside or outside your Help or Viewer title.

2. Provides background color control (covered below).

3. Allows definition of pixel-based window sizes.

 Registration: RR(`THNHLP',`THWaterMark',`UuuUSSU')

 Sample macro (watermark bitmap display): THWaterMark(hwndContext,300,300, coBackground, qchPath, `+!WATERMAR', 0x0000)
(Callable in any normal fashion.  Sample creates a global watermark in a Help window whose combined client and nonscrolling regions are sized to 300x300 pixels, whose bitmap is the only bitmap contained in the WATERMAR.LZH baggage file, and which is a JPEG graphic which will be tiled, will scroll with the text, and will be cached as DIB data on the hard disk to speed up topic displays on subsequent accesses to the topic.)

 Sample macro (background color control): THWaterMark(hwndContext,0,0,0xFFFF00,qchPath,`',0x0001)
(creates a cyan background used by this topic only; background color defaults back to that specified in [WINDOWS] on topic exit.  The fourth parameter is a BGR (blue/green/red) value, not an RGB.  Standard WinHelp RGB values can be applied through THRGB() if hex values are unwieldy.)

Parameters:

First parameter: always hwndContext.

Second and third parameters: desired width and height of the Help window in pixels.  If no resizing is desired then both parameters must be 0.  If resizing is desired then both parameters must be nonzero.  Sizing is applied to the display portion of the Help window only and this portion of the window is then centered on the screen prior to repainting standard Help borders, buttons and menus.  Use the supplied Window sizing reference as a guide to selecting appropriate window sizes.

Fourth parameter: background color as a BGR (blue/green/red) hexadecimal value.  May be applied with or without a watermark bitmap.  If color is entered as coBackground then no background color change is applied or else the background color is restored to default.  Use the background color reference chart as a guide to selecting background colors if you are unfamiliar with hexadecimal BGR indices.

Fifth parameter: always qchPath.

Sixth parameter: path and filename of watermark/background graphic plus path syntax and/or caching/baggage flags, in quotes.  If a watermark is to be displayed globally in all topics, then the desired bitmap should be the only bitmap in the archive.

Path referencing is mandatory if watermarks are to be displayed.  Empty quotes will apply background colors and/or window sizing without displaying a watermark bitmap.

If the watermark bitmap archive is stored in baggage, the archivename must be preceded by !” to point to the path as the internal file system.

If the watermark bitmap is stored outside the helpfile, the archivename should be preceded by ./” to point to the current directory.  Relative paths may be used; absolute paths are not recommended.

If the watermark bitmap is a JPEG graphic which will be cached to the hard disk, then a +” must precede any path referencing.

Seventh parameter: positioning/tiling flags.  ThinHelp supports a wide range of possible positioning, tiling and scrollability options.  See the Watermark bitmap positioning chart for a complete guide.  The 0x4000 and 0x8000 flags are available for use for paning effects but are not supported by the publisher.

0x0000 should be used as the positioning parameter when no watermark is desired.

Abbreviated (expert mode) registration: RR(`THNHLP.DLL',`THWM',`UuuUSSU')

Notes

As in HTML development, the palette should be considered carefully to prevent undesired dithering and color distortion.  Only one watermark per topic (for scrolling region) may be specified but watermarks can be altered without leaving the topic.  Can be called repeatedly; the first called watermark bitmap remains the default watermark for all topics until another watermark is accessed or the seventh (on-topic-exit) parameter is called as 0xnnn1.  Watermarks can also be removed by specifying no path, archive or filename (just empty quotes) in the macro.  Watermarks in secondary windows are permitted for up to six Windows 95 windows.  Nonscrolling (0x1nnn) watermarks may produce flicker effects.  Special-effect watermarks using the 0x4nnn and 0x8nnn positioning parameters are to be used at your own risk.


THRGB()

Function: Companion macro to THWaterMark() for the convenience of experienced authors.  Converts a standard WinHelp-type RGB value to a hexadeximal BGR value for insertion into a THWaterMark() macro.

 Registration: RR(`THNHLP',`THRGB',`UUU')

 Sample macro: THWaterMark(hwndContext, 0, 0,THRGB(255,255,128), qchPath, `', 0x0000)
(sets the global background color for this helpfile or series of topics to pale yellow by converting the THRGB() values to appropriate THWaterMark() BGR hexadecimal values.)

Notes: Primarily a convenience feature for experienced Help/Viewer authors who would prefer to enter background color values in the way they are usually recorded in the [WINDOWS] section of the project file as opposed to using BGR hexadecimal values.

Abbreviated (expert mode) registration: none


THSndPlaySound()

Function: Plays .WAV audio files from a compressed ,LZH archive.

 Registration: RR(`THNHLP',`THSndPlaySound',`SSSU')

 Sample macro: THSndPlaySound(qchPath,`BILDER.LZH', `THWAV', 0)

Notes: As demonstrated in the example above, the .WAV file need not have a .WAV extension if appropriately referenced.  .WAV files must be included in an .LZH archive.

Parameter reference:

Parameter	Type	Description
qchPath	String (S)	Filename of the .HLP or .MVB file containing the .LZH archives in its baggage.  qchPath is the recommended default value.
LzhFileName	String (S)	Name of the LZH-compressed baggage file containing the .WAV file, e.g. BILDER.LZH”
ArcFileName	String (S)	Name (or the beginning of the name) of a .WAV file contained in the LZH-compressed archive file specified in LzhFileName.  Standard DOS wildcards are not permitted in place of ThinHelp’s filename completion.
fuOptions	DWORD (U)	Option flags.  (These are the same flags used in the Windows sndPlaySound() function.)
		0:   Wait until the .WAV file is played before allowing user interaction with Windows (system modal playback)   1:   Do not wait for the .WAV file to be entirely played before allowing user interaction with Windows   9:   Loop the .WAV file (play repeatedly)   16: If another .WAV file is being played, allow it to finish before starting this one.
Abbreviated (expert mode) registration: none


THSetAnimationSpeed()

Function: Alters default frame advance interval for embedded window animations.

 Registration: RR(`THNHLP',`THSetAnimationSpeed',`u')

Abbreviated (expert mode) registration: none

 Sample macro: THSetAnimationSpeed(500)
(sets default animation speed to 500ms for this and all subsequent topics.  Animations without specified frame advance intervals will display at two frames per second.)

Notes: Default value is 300.  When used in a hotspot, button or menu item, activating this macro overrides any frame advance rate used in all current or future embedded windows.  Only one default animation speed per topic is permitted.  Multiple animations at different speeds must be set up using the frame advance parameter in each animation’s embedded window statement.  When activated from a button, menu item or hotspot, the rate change only takes effect at the beginning of the next bitmap display.  Upper limit is unknown (values as high as 9,000,000 have been tested); lowest practical value is probably 30 (equivalent to 33fps video).  Button strips/popup menus offering user-selectable animation display speeds are possible but should be tested thoroughly.

Abbreviated (expert mode) registration: RR(`THNHLP',`THSTC',`S')


THShellExecute() macro syntax
THShellExecute()

Functions: Permits full compatible operation of the ShellExecute() function from Help in all versions of WinHelp.  Emulates all functions except display state, which defaults to SW_NORMAL.

 Registration: RegisterRoutine(`THNHLP',`THShellExecute',`i=USSSSU')

 Sample macro: THShellExecute(hwndapp,`',`',`README.TXT',`./SUPPORT',1)
(Callable in any normal fashion.  Sample launches the default application associated with .TXT files and opens README.TXT into the program from the current directory and uses the \SUPPORT\ subdirectory of the current directory as the working directory.)

Parameters:

First parameter: always hwndApp.

Second parameter: desired action.  Can be open” or print”.  If no action is specified, open” is used as the default as shown in the sample above.

Third parameter: name and path (absolute or relative) of the program to be opened.  Usually used with no parameter here since ShellExecute() is needed primarily to open files independent of their association.

Fourth parameter: parameters taken by the program in the third parameter.  Usually the filename with absolute or relative path.

Fifth parameter: working directory for this instance of the task.

Sixth parameter: display state for the launched application, norma

Display state parameter reference:

DisplayState	Parameter value	Meaning and  function
HIDE	0	Hides the window and passes activation to another window.
SHOWNORMAL	1	Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as RESTORE).
SHOWMINIMIZED	2	Activates a window and displays it as an icon.
SHOWMAXIMIZED	3	Activates a window and displays it as a maximized window.
SHOWMINNOACTIVATE	4	Displays a window in its most recent size and position.  The window that is currently active remains active.
SHOW	5	Activates a window and displays it in its current size  and position.
MINIMIZE	6	Minimizes the specified window and activates the top-level window in the system's list.
SHOWMINNOACTIVE	7	Displays a window as an icon. The window that is currently active remains active.
SHOWNA	8	Displays a window in its current state. The window that is currently active remains active.
RESTORE	9	Activates and displays a window. If the  window is minimized or maximized, Windows restores it to its original size and position (same as SHOWNORMAL).
Abbreviated (expert mode) registration: RR(`THNHLP.DLL',`THSE',`USSSU')


THFileExists() macro syntax
THFileExist() macro syntax

Functions: Compatibility macro; adds FileExist() equivalent functionality to 16 bit helpfiles and Multimedia Viewer.  Used in IfThenElse() macros.

 Registration: RR(`THNHLP',`THFileExist',`S')

Sample macro (no template provided...one-parameter function): IfThen(THFileExist(`superapp.exe'),JI(`',`superapp_installed_successfully')
(Callable in any situation requiring a boolean return value.  Sample searches for SUPERAPP.EXE in the Windows path.  If found, it returns TRUE to IfThen(), causing WinHelp to jump to the topic specified as the IfThen() action.

Abbreviated (expert mode) registration: RR(`THNHLP.DLL',`THFE',`S')

Notes

Watch for case.  THFileExist(), not THFileExists().  Absolute/relative paths are supported.

Front-slashes in paths are rejected in THFileExists()...substitute backslashes.


THMessageBox() macro syntax

Functions: This macro provides enhanced message box support with full version-independent compatibility across Windows versions and WinHelp 16/32 bit compiling.  Includes the four basic MessageBox() types plus support for processing user actions as a boolean return value or short integer.

 Registration: RR(`THNHLP',`THMessageBox',`u=USSU')

 Sample macro: THMessageBox(hwndContext,`This is the content of the message.',`This is where the caption is entered.',0)
(Callable in any normal fashion.  Sample pops up a simple message box with no icon and an OK button.)

 Sample macro: IfThen(THMessageBox(hwndContext,`This is the content of the message. Select Yes or No',`Do you want to jump to the test topic?',36),`JI(`',`anytopic')')
(Callable in any normal fashion.  Sample asks user with Yes/No messagebox and questionmark icon whether they want to browse a specific topic.  No action is taken if No is pressed.)

Parameters:

First parameter: always hwndContext.

Second and third parameters: Second parameter is actual message content; third parameter is message caption bar text.  Quotes and commas are not permitted in either parameter since they are reserved by Help macros for macro punctuation.

Fourth parameter: Message box style as a sum of the icon and style flags, e.g. Yes|No messagebox with STOP icon would use 4+16=20 for the fourth parameter.  Style values marked with *” are not recommended for Help.

Messagebox style values: 0 OK 1 OK|Cancel 2 Abort|Retry|Ignore* 3 Yes|No|Cancel* 4 Yes|No 5 Retry|Cancel	Icon style values: 16 STOP icon 32 (?) icon 48 (!) icon 64 (i) icon
Return values:

There are two possible types of return values.  For calling macros expecting u, use the integer value; for macros expecting i (i.e. IfThen(), IfThenElse()) use the boolean value.

Button text	AsInteger (u)	Boolean (i)
OK	1	TRUE
Cancel	2	FALSE
Abort	3	TRUE
Retry	4	FALSE
Ignore	5	TRUE
Yes	6	TRUE
No	7	FALSE
Abbreviated (expert mode) registration: RR(`THNHLP.DLL',`THMB',`u=USSU')

Notes

Linefeed characters must be authored manually into message text in the RTF using the associated RTF virtual keycodes.  They cannot be added in Word and will not be preserved when reloading a macro with a manually-added linefeed back into Word.  Also avoid commas and quotes except as virtual keycode equivalents.


THMoveWindow() macro syntax

Function: Moves and/or resizes the current window to the coordinates specified.  May be used in 32 bit helpfiles in place of SetWindowPos() or HelpWinInfo().

 Registration: RR(`THNHLP',`THMoveWindow',`u=Uiiiii')

 Sample macro: THMoveWindow(hwndApp,100,100,400,400,1)
(Callable in any normal fashion.  Sample resizes the current window to 400x400 pixels in dimension and positions the window 100 pixels in from left edge and 100 pixels down from the top.)

 Sample macro: THMoveWindow(hwndContext,100,100,400,400,1)
(Callable in any normal fashion.  Sample resizes only the client region (scrolling topic display area) of the current window to 400x400 pixels in dimension and positions the window 100 pixels in from left edge and 100 pixels down from the top.  The window borders and menus are left where they were prior to sizing.)

 Sample macro: THMoveWindow(hwndApp,-1,-1,400,400,1)
(Sample resizes the current window to 400x400 pixels in dimension and does not reposition the window in relation to the screen borders.)

 Sample macro: THMoveWindow(hwndApp,100,100,-1,-1,1)
(Sample moves the current window to 100 pixels in and 100 pixels down from the top and left edge of the screen but does not resize.)

Parameters:

First parameter: hwndContext (acts on scrolling client region of the window only), or hwndapp (acts on entire window).

Second parameter: Distance from the left edge of the screen in pixels where the window border begins.

Third parameter: Distance from the top edge of the screen in pixels where the window border begins.

Fourth parameter: Desired width of the window in pixels.

Fifth parameter: Desired height of the window in pixels.

Sixth parameter: Always 1.  (Repaints window to desired specifications.)

Return values:

Returns TRUE if redraw of window was successful, otherwise FALSE.  (Of limited practical value.)

Abbreviated (expert mode) registration: RR(`THNHLP.DLL',`THMW',`u=Uiiiii')

Notes

This macro is intended for main window usage only.  Cross-version compatibility with Windows NT may be compromised if THMoveWindow() is used for secondary window sizing applying GetWindow() to fetch the secondary window handle.

Window resizing and repositioning can be done independently.  If -1 is specified for parameters 2 and 3, the window is repositioned to the desired coordinates but no resizing is done.  If -1 is specified for parameters 4 and 5, the window is resized to specifications but no repositioning is done.


THStringToClipboard()

Function: Copies an author-definable string of text to the clipboard

 Registration: RR(`THNHLP',`THStringToClipboard',`S')

 Sample macro: THStringToClipboard(`Remember to turn off your computer at night.ÿThis will save power and reduce costs.')
(copies this message to the clipboard.  The ÿ character, entered as Alt+255, is reserved as a linefeed character since carriage return characters are not easily handled by this type of macro in many authoring tools.)

Notes: String length is subject to the 256-character macro limit in 16 bit Help.  This limit is extended to 4096 characters in 32 bit Help.

Abbreviated (expert mode) registration: RR(`THNHLP',`THSTC',`S')


THIsWIN32()

Function: Determines the version of the ThinHelp DLL module currently loaded in memory or the version of Windows in which ThinHelp is running and returns a true/false value.  This macro functions differently depending on which version of ThinHelp is in use.

 Registration: RR(`THNHLP',`THIsWIN32',`i=U')

Both versions:

 Sample macro: IfThenElse(THIsWin32(0), `JI(`',`32_bit_intro_topic')', `JI(`',`16_bit_intro_topic')')
(checks to see if ThinHelp 32 bit was loaded when THIsWIN32() was registered, and if so, jumps to the intro topic for users of 32 bit Help; if not, assumes 16 bit ThinHelp is loaded and jumps to intro topic for users of 16 bit Help.)

THNHLP/THNBMP.DLL 16 bit:

 Sample macro: IfThenElse(THIsWin32(1), `JI(`',`Win95_intro_topic')', `JI(`',`Win31_or_NT_intro_topic')')
(checks to see if ThinHelp 32 bit is in use on Windows 95, and if so, jjumps to the intro topic for users of Windows 95; if not, it assumes 16 bit Help is loaded and jumps to intro topic for users of 16 bit Help under Windows NT or 3.1.)

THNHLP/THNBMP 32 bit:

 Sample macro: IfThenElse(THIsWin32(0), `JI(`',`32_bit_intro_topic')', `JI(`',`16_bit_intro_topic')')
(checks to see if ThinHelp 32 bit was loaded when THIsWIN32() was registered...same action as (0) as parameter value)

Abbreviated (expert mode) registration: none


THTestLicenseKey()

Function: Checks name and serial number in registry for valid registered user information.

 Registration: RR(`THNHLP',`THTestLicenseKey',`i=USSSii')
(may alternately be registered as `u=USSSii' or U=USSSii' for returning boolean values to macros which require unsigned integers.)

 Sample macro: THTestLicenseKey(hwndApp, `THNHLP', `', `SNR', 30, 0)
(checks to see if 30 days have passed since the installation of the software)

Parameter reference:

Parameter	Type	Description
hwndApp	HWND (U)	Window handle of the WinHelp or Multimedia Viewer instance from which the macro was executed.  Never varies from hwndApp.
Keyname	String (S)	Name of the base key in the registry.
NameField	String (S)	Name of the first field for the registration key pair test.
SnrField	String (S)	Name of the second field for the registration key pair test.
MaxDays	Signed integer (i)	Maximum number of elapsed days since writing the registry value which will be accepted if the registration key pair test fails to produce a match.
Action	Signed integer (i)	Action to take if the test fails: 0 Show message box and close WinHelp immediately 1 Take no action; instead return 1 to the calling macro if the software setup is not correct (e.g. if fields have been deleted). 2 Take no action but return 1 if the registration key pair test failed and the time limit given in MaxDays has been exceeded.
Notes: May be combined with the following macro sequence to check for valid ThinHelp module (i.e. check for erasure) and shut down (or, alternatively, jump to a warning topic) if not found.

 RR(`krnl386.exe',`GetModuleHandle',`i=S')
IfThen(Not(GetModuleHandle(`THNHLP')),`Exit()')
(checks to see if THNHLP.DLL is in memory and if not, it exits the helpfile.  Callable in any normal fashion.  Note: GetModuleHandle() is not available in Windows NT.)

Parameter list and values are available from the THTestLicenseKey() help topic or by viewing the HPJ file for the registration demo.

Abbreviated (expert mode) registration: none


THSetCacheSize()

Function: Controls RAM memory usage by ThinHelp.

 Registration: RR(`THNHLP', `THSetCacheSize',`UUU')

 Sample macro: THSetCacheSize(500000,3000000,0)
(limits ThinHelp's embedded window bitmap cache to 500,000 bytes, will not use any caching unless a minimum of 3 megabytes of free memory are available on the target system.  Callable in any normal fashion.  May be used to set larger-than-normal temporary cache sizes for topics with animations.)

Notes: Also available in JPANI 1.3.10 and higher (not previously documented).  ThinHelp defaults are dynamic and vary depending on the capabilities of the target system.  This macro is usually required only in context-sensitive help as a means of insuring that Help performance conforms with the advertised specifications of the product with which it is to be bundled.

Abbreviated (expert mode) registration: none


LHAExpand() (HLPLHA.DLL)

Function: Extracts files from baggaged or loose LZH files.  Unsupported; use at your own risk.

 Registration: RR(`HLPLHA',`LHAExpand',`SSSUUU')
(only macro required for non-baggaged LZH files)

 RR(`HLPLHA',`MMHelpFileSystem',`')
MMHelpFileSystem()
(optional macros required to access baggaged LZH files)

 Sample macro: LHAExpand(`MYHELP.HLP+DATA.LZH', `./SUPPORT/', `README.TXT', 3,0,0)
(Callable in any normal fashion.  Example extracts the README.TXT file which is located in DATA.LZH to the \SUPPORT\ subdirectory of the current directory.  DATA.LZH in turn is a baggaged file inside MYHELP.HLP which may or may not be the helpfile which contains DATA.LZH.)

Parameters: First parameter is the LZH archivename and path if required for the source archive, optionally prepended by the helpfile name and a +” if used for baggaged archives.  Second parameter is the extraction path.  Third parameter is the filename or filemask for extraction (uses ThinHelp-style filename completion; standard wildcard characters are invalid).  Fourth, fifth and sixth are constants in this version of HLPLHA.DLL.

Notes: Requires careful attention to working directory setup when installing the helpfile.  Default extraction path may change if the user changes directories while the helpfile is open.

Abbreviated (expert mode) registrations: none


SHG graphic import filtering

Function: Imports SHG files as DIBs into applications offering MS graphic import filter compatibility (16 bit only).

 Registration: Accomplished through WIN.INI.  Modify WIN.INI with the following line in the [MS Graphic Import Filters] section:
Segmented Hypergraphic(.SHG)=[InstalledDLLPath]\THNHLP.DLL,SHG
(...where [InstalledDLLPath] is the directory path of the 16 bit version of THNHLP.DLL.)

Sample WIN.INI section entry:

[MS Graphic Import Filters]

Segmented Hypergraphic(.SHG)=E:\THINHELP\redist\thnhlp.dll,SHG

Supported applications (tested): MS Word 2.0
MS Word 6.0
Microsoft Office 3.x
Paint Shop Pro 3.0/3.11 (16 bit)
JASC Multimedia Center
DaVinci 2.2
    (the universal graphic import tool used by FormPad and Push)
LZVIEW
Should be compatible with most applications using the MS Graphic Import Filters.

Notes: The simplest method of installing THNHLP.DLL as a graphic import filter is simply to copy the most recent version to the MSAPPS\GRPHFLT\ directory and reference its path in WIN.INI pointing to this directory.


ThinHelp bitmap limits

ThinHelp’s current limits for bitmap display are 200 unique bitmaps per topic and 500 individual frames per animation.  Memory cache optimization features built into ThinHelp permit the same bitmap to be used repeatedly in the same topic without an observable decrease in performance.

Size limits on bitmaps are machine-dependent.  Performance will of course be poorer on lower-end systems attempting to display large high-resolution graphics.


About to launch Help to RTF...

All files in ThinHelp’s help system include complete, uncrippled functionality with our Help to RTF conversion software for allowing you to create Word-compatible documentation from helpfiles including all bitmaps and embedded window objects.  This feature is reserved exclusively for helpfiles included with Herd Software Development software products.  For complete functionality with all helpfiles you will need to own a license to Help to RTF Standard or Help to RTF Pro.

You can use the evaluation version of Help to RTF included in this package to create printable documentation from any of the included helpfiles and optionally load the appropriate helpfile directly into Help to RTF by selecting the Print Some or All Topics... item from each helpfile’s File menu.

Select one of the following:

Launch Help to RTF        Learn more about Help to RTF