Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> rh_width() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    RH_WIDTH()

Purpose:     Get the maximum line width within a help text block

Syntax:      RH_WIDTH( rhelpfile, help_key )

Arguments:   rhelpfile   - This parameter may be either the rhelp compiled
                           filename, or the numeric file handle returned
                           from a previous call to FOPEN() to open the
                           help file.

             help_key    - Character value indicating the text associated
                           as the key for the desired help.  This text can
                           any length but only the first 16 characters are
                           significant.  Case is insensitive.

Returns:     Numeric maximum line width with the associated help text
             block.  If the specified help key is not found, or an error
             occurs, zero is returned.

Description: This function reads and returns a block of the maximum line
             width of all the text lines within a help text associated
             with the specified help key, from a help file that was
             compiled with the Rhelp compiler.  Knowing this maximum width
             allows you to tailor the help display window width to the
             size of the text.

             The help key is a unique character string which is
             significant to the first 16 characters, that identifies an
             entry in the Rhelp compiled help file.  This allows help
             systems to be queried by supplying a descriptive character
             string.

             See Appendix C entitled The RHELP Compiler for more detailed
             information and examples.

Notes:       If the helpfile parameter is supplied as a character string,
             it is deemed to be the name of the Rhelp file.  In this case
             the help file is opened (using FOPEN()), the header is then
             extracted, the help file closed, and the header returned.  If
             the FOPEN() fails, a null is returned, and RLIBERROR() set.

             If the helpfile parameter is supplied as a numeric value, it
             is deemed to be the numeric file handle returned by
             previously FOPEN()ing the help file.  In this case, the text
             is read and returned, but the file is not closed.  This
             feature allows you the flexibility of leaving the help file
             open during the course of your application, therefore
             speeding up access by not having to constantly open and close
             the help file.  This method of access is not recommended if
             you are short on file handles or you are not comfortable with
             low level file operations.  If you use this method, always
             remember to FCLOSE() your files.

             The help file pointer position is left unchanged.

Example:     helpMaxWidth = RH_WIDTH("myapp.hlp", "MENU HELP" )

             *-- or

             helpHandle = FOPEN("myapp.hlp")
             helpMaxWidth = RH_WIDTH( helpHandle, "MENU HELP" )

Source:      RL_RHELP.PRG

See also:    RH_HEADER(), RH_TEXT(), RH_LINES()

See Also: RH_HEADER() RH_TEXT() RH_LINES()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson