VXPLib Documentation: QHTML
QUICK HTML FOR APPLICATIONS 1.0
SPECIFICATION DOCUMENT

INTRODUCTION
Specification of the HTML 4.0 standard allows for using external files, such as pictures to be displayed in the document. Any reference to an extra informational source implies using a reference to another HTML document containing the information. This concept was studied in applying to standard stand-alone programs and the way they manage text, graphics and other resources. When developing a standard windows application most programmers today are biased to whatever possible integration with the Internet, which, in its final stage is supposed to become just an HTML document with all the functionality right in it. However, professional applications require much more control over the PC they are running on to assure better quality of the product, which comes through projected speed, reliability and specifics of the user interface. Some try to find the middle ground between internet applications and standard GUI applications by generating and displaying HTML documents by means of services provided by an Internet Browser. Such approach can give however very little flexibility in adhering to the Internet style of your applications, and the reasons for this are as follows:
  • Whatever simple contents of your document you need to display you will have to run the whole of your Internet Browser with its interface, security, and many other services you don't really need - all eventually builds on the memory and PC speed requirements, becoming that way not acceptable for a simple application.
  • There is no way to make an Internet Browser display parts of your user interface along with using standard methods. Using a Web Browser will always imply limitation to a rectangle document that you can display apart from the rest of GUI that you might have.
  • There are many types of Web Browsers out there, and accounting for their specifics may turn out an overload of efforts to make your application look the same way under all internet browsing platforms.
  • Whatever resources an HTML document refers to can only be external, like graphic files and other HTML documents, while all standard applications are used to work with windows standard resources stored in DLL and EXE files. Reorganizing all resources of a professional application as external files most definitely won't yield anything good from any point of view.

Quick HTML for Applications was specifically designed to solve all these problems while adhering to the principles of using open source code.

This document describes supported syntax of QHTML (Quick HTML) implemented by the IVXPQuickHTML interface, which is further on referred to as the parser.
Most of the syntax is very close to the syntax of the standard HTML. It is again a Hyper Text Mark-up Language only intended to be used within regular stand-alone applications for Microsoft Windows.
Wherever possible described herein standard adheres to the standard HTML whilst providing a wide range of functionality missing in the standard HTML and vitally important in developing stand-alone professional applications using a mark-up language to simplify development of GUI of complex contents.

SYNTAX
The common syntax used for Quick HTML is the same as for the standard HTML. It uses the same form of <TagName Attribute1=... Attribute2=...>
The TagName must be one of the names described in the Tags Specification below, and any number of space symbols before and after the TagName will be ignored.
The parser is not case-sensitive to names of tags or tag attributes.
Within a tag the tag's name and attributes can have any number of separators between them.
Contents of a tag attribute depends on the tag, and is declared in one of the following ways:
  • It can be included within two apostrophe symbols, i.e. Attribute='...'
  • It can be included within two quotation marks, i.e. Attribute="..."
  • It can use an open declaration, and the contents of such attribute is defined from the first non-separator symbol following '=', and it ends where the second separator is met.
    The separator can be Space, Tabulation, New Line, Comma, Semicolon or another symbol '='.

When an attribute is defined without any value it is ignored. However, an attribute with empty contents is recognized as a correct one, i.e. declaration of Attribute='' or Attribute="" will be treated by the parser as a correct one.

Some tag attributes have their abbreviated versions supported by the parser. All such abbreviations are described in the tag specification below. If the parser finds both full and abbreviated attribute defined within the same tag, it will use the abbreviated version of the attribute ignoring the full version.

The list of all supported tags and their attributes is given in chapter Tags Specification.

RESOURCE FILES
The parser can work with resources stored in any resource-containing binary file, such as EXE, DLL, OCX, CPL,...etc. In tags that support it attribute RES is used for accessing resource files. The parser is not case-sensitive to the contents of RES. Attribute RES supports the following syntax:
  • RES='ResTypeName:ResName'
  • RES='ResTypeName:#ResID'
Between ResTypeName and ResName or ResID must be used whether symol ':' or '='.
  • ResTypeName - tells the parser under what resource type name the resource is stored.
  • ResName - name of the resource.
  • ResID - the resource identifier.
The only exception to this form is made for tag <TXT> when ResTypeName can be skipped, and the tag then refers to a text string resource: RES='#ResID'.
When a tag supports an attribute that refers to a file specifying at the same time attribute RES makes that file be treated as a resource file. For instance, tag <IMG SRC='image.ico'> refers to an external icon file, while tag <IMG SRC='app.dll' RES='ICO:IDR_MAINFRAME'> refers to an icon stored in the app.dll file. When only RES is specified without the tag's attribute that refers to a resource in the default resource file.

GRAPHICS
All the graphics supported by the parser is based on using the IPicture COM interface except for the windows standard graphic formats: BMP, ICO, ANI, CUR. Interface IPicture can work with various graphic formats, even though Microsoft doesn't mention it in the official documentation for this interface. The version of IPicture available on Windows 2000 is known to support the following formats: GIF, JPEG, EMF and WMF. If the parser finds a reference to a graphical file with format different from BMP, ICO, ANI or CUR, it redirects all drawing functionality into the IPicture interface.
The main reason for the parser not to use IPicture for standard graphics is to optimize drawing speed for such graphics. Another reason, for instance, is that IPicture cannot display correctly icons with more than 16 colors, while the standard Windows API allows to do that.

COLOR PALETTE
The parser can recognize names of all the 256 named colors described in the HTML 4.0 standard. Whenever it is required to specify a color in a tag you can use any of the standard 256 named colors for the color value. The parser in not case-sensitive to the color names. When a color is required different from any named color the standard form of #RRGGBB can be used instead where RR, GG and BB are hex forms of red, green and blue colors accordingly.

Additionally, the parser recognizes names of all windows system colors:

  • 3DDKSHADOW
  • 3DFACE
  • BTNFACE
  • 3DHILIGHT
  • 3DHIGHLIGHT
  • BTNHILIGHT
  • BTNHIGHLIGHT
  • 3DLIGHT
  • 3DSHADOW
  • BTNSHADOW
  • ACTIVEBORDER
  • ACTIVECAPTION
  • APPWORKSPACE
  • BACKGROUND
  • DESKTOP
  • BTNTEXT
  • CAPTIONTEXT
  • GRADIENTACTIVECAPTION, GAC
  • GRADIENTINACTIVECAPTION, GIC
  • GRAYTEXT
  • HIGHLIGHT
  • HIGHLIGHTTEXT
  • HOTLIGHT
  • INACTIVEBORDER
  • INACTIVECAPTION
  • INACTIVECAPTIONTEXT
  • INFOBK
  • INFOTEXT
  • MENU
  • MENUTEXT
  • SCROLLBAR
  • WINDOW
  • WINDOWFRAME
  • WINDOWTEXT
Names for all these colors are given exactly in the same way as described in MSDN for API function DWORD GetSysColor(int nIndex), with only removed prefix COLOR_
Documentation on this function in MSDN gives explanation of the meaning of each color.
SPECIAL SYMBOLS
The syntax of HTML 4.0 Standard to insert special symbols into the document is fully supported by the QHTML parser. Two formats for special symbols are possible: &name and &#code. The parser supports all symbol names described in the HTML Standard 4.0 document, and plus one extra - &tab to be used for tabulation insertion instead of &#09
TAGS SPECIFICATION
The table below describes all tags supported by the Quick HTML parser at present:
Tag nameAttribute
name
DescriptionDefault
value
<FONT> Changes the current font. Tag </FONT> closes the font tag, and selects the previously active font. Although it doesn't support property sheets, complete list of all necessary properties in combination with other tags - font modifiers allow to select any possible font installed on the computer. Additionally, you can select background and foreground colors for the font.
COLOR The color attribute sets the color which text will appear in on the screen.
BGCOLORSets background color of the text. It defaults to having the background color transparent.
FACE Sets the typeface that will be used to display the text on the screen.
CHARSET Specifies the character set, and can be whether an integer value or one of the following predefined values:
  • ANSI - Specifies the standard Windows American National Standards Institute (ANSI) character set.
  • ARABIC - Specifies the Arabic character set.
  • BALTIC - Specifies the Baltic character set.
  • CHINESEBIG5 - Specifies the Chinese BIG 5 character set.
  • DEFAULT - Specifies the default character set.
  • EASTEUROPE - Specifies the Eastern Europe character set.
  • GB2312 - Specifies the Great Britain 2312 character set.
  • GREEK - Specifies the Greek character set.
  • HANGUL - Specifies the Korean Hangeul character set.
  • HEBREW - Specifies the Hebrew character set.
  • JOHAB - Specifies the Johab character set.
  • MAC - Specifies the Macintosh character set.
  • OEM - Specifies the original equipment manufacturer (OEM) character set.
  • RUSSIAN - Specifies the Russian character set.
  • SHIFTJIS - Specifies the Shift JIS character set.
  • SYMBOL - Specifies the Symbol character set.
  • THAI - Specifies the Thai character set.
  • TURKISH - Specifies the Turkish character set.
  • VIETNAMESE - Specifies the Vietnamese character set.
The parser is not case-sensitive to the charset names.
SIZE Font size. A real size, or +/- can be specified for the current font size.
Examples:
SIZE=12 - will set size 12 for the current font
SIZE=+2 - will set the current font size equal to the size of the default font plus 2
SIZE=-4 - will set the current font size equal to the size of the default font minus 4
There is no limitation for the font size requested by this property. In combination with other tags that change the font style the user has full control over the font settings.
The following example will select font 'Verdana' to be the current one, with size 12, Red text color, and it also will have bold italic style:
<b><i><font face='Verdana' size=12 color=Red>Some Text</font></i></b>
Will display: Some text
WEIGHT Specifies a relative font weight (boldness). Possible values: 100, 200, 300, 400, 500, 600, 700, 800, 900
It allows finer control of the font's boldness, rather than using tag <B>
<B>Selects the current font to be bold. This tag has no parameters, and has the same effect is if you were specifying attribute WEIGHT=700 for tag <FONT>. To return the current font to its previous state use tag </B>.
<I>Selects italic font. Use tag </I> to select the previous font style. This tag has no parameters.
<U>Selects underlined font. Use tag </U> to select the previous font style. This tag has no parameters.
< S>,
<STRIKE>
Selects stricken font. Use tag </S> or </STRIKE> to select the previous font style. This tag has no parameters.
<BR> Begins a new line. The amount of line space used is the same as height of the currently selected font. This tag has no parameters. It is a specific of the parser opposed to Internet Browsers that it never begins a new line automatically no matter how long the current line is. The parser can begin a new line only by using tags <BR> and <HR>.
<HR> A Horizontal Rule element - is a divider between sections of text such as a full width horizontal rule or equivalent graphic.
SIZEThe SIZE attribute allows to specify how thick they wish the horizontal rule to be. 2
WIDTHWidth of the horizontal rule in percent of the space available for the rule context. Adding symbol % is not required. 100%
ALIGNOne of the values: LEFT, RIGHT, CENTER LEFT
COLORColor of the horizontal rule. Black
SHAPEShape of the horizontal rule. Allows three possible forms of appearance for the divider:
RECT - rectangle shape
ROUND - rounded shape
ELLIPSE - ellipse shape
RECT
<TABLE> Opens a new table. If the table is not followed by tag </TABLE> all contents of such table will be ignored. The parser supports embedded declarations table-within-table of any depth.
BORDERWidth of the table border in pixels. 0
BORDERCOLORColor of the table border.
Note: The parser also recognizes abbreviation BC for this attribute.
Black
BGCOLORColor of the table background. Transparent by default when used on its own, and Black when attribute GFC is used. Black
CELLSPACING The CELLSPACING is the amount of space inserted between individual table data cells (table grid width).
Note: The parser also recognizes abbreviation CS for this attribute.
0
CELLPADDING The CELLPADDING is the amount of white space between the borders of the table cell and the actual cell data
Note: The parser also recognizes abbreviation CP for this attribute.
2
BACKGROUND Background picture for the entire table, if the RES property is not specified, or resource file, if RES is specified.
Note: The parser also recognizes abbreviation BG for this attribute.
GFC Gradient Fill Color. Fills the table using gradient color effect from color BGCOLOR to GFC. It defaults to Black color, but won't work unless set explicitly. Black
GRAD Gradient fill direction. Can be one of two values: HOR or VERT to specify Horizontal or Vertical gradient accordingly. HOR
RES Redirects source of the background picture to a resource file.
Format examples:
RES='JPEG=#192' - will allocate a resource type JPEG in the resource file, and resource with number 192.
RES='GIF=IDG_MAINGIF' - will allocate a resource type GIF in the resource file, and resource with name IDG_MAINGIF.
When RES is used, contents of BACKGROUND is treated as a resource file. If BACKGROUND is not specified, the default resource file is used.
<TR> Opens a new row in the table. If the row is not followed by </TR> all contents of such row will be ignored.
ALIGNHorizontally aligns contents of the table row. Possible values: LEFT, RIGHT, CENTER LEFT
VALIGN Vertically aligns contents of the table row. Possible values: TOP, MIDDLE, BOTTOM TOP
BGCOLORBackground color of the entire row. Transparent by default when used on its own, and Black when attribute GFC is used.
BACKGROUND Background picture for the entire row, if the RES property is not specified, or resource file, if RES is specified.
Note: The parser also recognizes abbreviation BG for this attribute.
GFC Gradient Fill Color. Fills the row using gradient color effect from color BGCOLOR to GFC. It defaults to Black color, but won't work unless set explicitly. Black
GRAD Gradient fill direction. Can be one of two values: HOR or VERT to specify Horizontal or Vertical gradient accordingly. HOR
RESThe same as for tag <TABLE>, property RES.
<TD> Opens a new column in the table. If the column is not followed by </TD> all contents of such column will be ignored.
ALIGNHorizontally aligns contents of the cell. Possible values: LEFT, RIGHT, CENTER LEFT
VALIGN Vertically aligns contents of the cell. Possible values: TOP, MIDDLE, BOTTOM TOP
BGCOLORBackground color of the cell. Transparent by default when used on its own, and Black when attribute GFC is used.
BACKGROUND Background picture for the cell, if the RES property is not specified, or resource file, if RES is specified.
Note: The parser also recognizes abbreviation BG for this attribute.
GFC Gradient Fill Color. Fills the cell using gradient color effect from color BGCOLOR to GFC. It defaults to Black color, but won't work unless set explicitly. Black
GRAD Gradient fill direction. Can be one of two values: HOR or VERT to specify Horizontal or Vertical gradient accordingly. HOR
RESThe same as for tag <TABLE>, property RES.
WIDTHMinimum width of the cell. If the cell's contents is wider than the specified with, the cell width is enlarged to its contents width.0
HEIGHTMinimum height of the cell. If the cell's contents doesn't fit in the specified height, the cell height is enlarged to its contents height.0
< IMG>The image element for in-line graphics. Officially supported formats: BMP, ICO, CUR, ANI, EMF and WMF. Unofficially supported formats: JPEG, GIF, ... etc., all formats supported by the IPicture interface in the system. Read Graphics
SRC Picture file name, if the RES property is not specified, or resource file containing the picture, if RES is specified. ""
ALT An alternative text to appear instead of the picture when the picture is not found. Currently selected font is used for that. ""
RES The same as for tag <TABLE>, property RES, except for the Windows Standard Resources when the resource type name must be one of the following: BMP for bitmaps, ICO for icons, CUR for cursors, and ANI for animation files.
Example: <IMG RES='ICO:IDR_MYICON'> - will load an icon with name IDR_MYICON from the default resource file.
""
BORDER Border width to surround the picture. 0
WIDTH Sets exact width of the picture in pixels. Defaults to the picture's original width.
HEIGHT Sets exact height of the picture in pixels. Defaults to the picture's original height.
BGCOLOR Background color for the picture. Can be seen when the picture fails to load, or when a picture with transparent background is used. Transparent by default when used on its own, and Black when attribute GFC is used.
GFC Gradient Fill Color. Fills background of the picture using gradient color effect from color BGCOLOR to GFC. It defaults to Black color, but won't work unless set explicitly. Black
GRAD Gradient fill direction. Can be one of two values: HOR or VERT to specify Horizontal or Vertical gradient accordingly. HOR
BORDERCOLOR Color of the picture border, if such presents.
Note: The parser also recognizes abbreviation BC for this attribute.
Black
<TXT> Dynamic text tag. It can load text from any source, format it, and insert instead of itself. When property ID is used the QHTML parser is trying to retrieve text from an abstract source, thus making it possible to get the text from anywhere (read property ID).
FILE When property RES is not specified it refers to a text or HTML file. When RES is specified it refers to a resource file.
Examples:
1) <txt file='readme.txt'> - will load a text file with name readme.txt and apply auto-formatting to it.
2) <txt file='readme.txt' size=100 format=none> - will try to load the first 100 bytes from a text file with name readme.txt without applying any formatting to it.
RES When property FILE is not specified it refers to a text or HTML resource in the default resource file. Otherwise, it refers to a resource in the file specified by property FILE.
Examples:
1) <txt res=#57604> - will load a string with ID 57604 from the default resource file and apply auto-formatting to it.
2) <txt res='html:idr_mydoc'> - will load an HTML document with name idr_mydoc from the default resource file and apply auto-formatting to it.
3) <txt res='html=idr_mydoc' file='myres.dll' format=html> - will load an HTML document with name idr_mydoc from resource file myres.dll, and apply HTML formatting to it.
FORMAT Formats the loaded text in one of the four possible ways:
NONE - no formatting to be applied
SIMPLE - applies simple formatting as one applicable to a text file when symbol '\n' is simply replaced by tag <BR>
HTML - applies HTML formatting to the loaded text.
AUTO - the parser will scan the text to find out whether it is HTML or plain text, and apply whether HTML or SIMPLE formatting accordingly.
AUTO
CODEPAGE This attribute provides for multilingual text support. The parser can select a code page individually for each tag <TXT>. When this attribute is not specified the parser uses its property TxtCodePage as the default code page.
Examples:
  • <TXT RES=#120; CODEPAGE=65001> - will change the code page to UTF8 for the loaded text string.
  • <TXT FILE='russian.txt'; CP=1251> - will select russian code page for the loaded text file.
Notes:
1. The parser also recognizes abbreviation CP for this attribute.
2. Avoid using attributes CODEPAGE and ID at the same time with fonts that require Wide Char or Unicode presentation.
0
SIZE When text is loaded from an external file a size limit can be forced to apply. When the size is set to 0 no size limit applies. Otherwise, this property specifies the number of bytes that can be read from the file.
Note: In the current version setting size to 0 is the same as setting to 65536, which defines the maximum file size. However, the maximum size can be modified in the future whilst the meaning of size 0 will remain the same.
0
ID When specified changes the way parser treats tag TXT. Instead the parser assumes that the tag refers to a virtual text source, which can be anything, and only the client application knows how to retrieve that information from the source. For instance, such tag can imply a reference to an SQL server containing some sort of records where the ID parameter then can be treated as a record ID. In any way, when ID is specified the parser fires event OnGetText expecting from the client application to handle this event, and return a text string in the end. In the meantime, the parser assumes the following:
  • FILE refers to any file, if specified. Full path to the file then passed as one of the parameters of OnGetText, if the file was found, or an empty string otherwise;
  • RES, if specified can contain any text string, which will be passed as a parameter for OnGetText without any modification. For instance, it can contain a part of information to identify where and how the client application must retrieve the resulting text.
  • FORMAT will be applicable to the text returned by OnGetText in just the same way as without using parameter ID;
  • SIZE, if specified can contain any integer value, which will be passed in OnGetText as an extra parameter. For instance, it can be an extra ID for something to retrieve text.
0
<DOC>Dynamic document. Allows to insert a dynamic (virtual) document right into the QHTML context. Such document supports custom drawing, thus makes it possible to display any document the client application is aware of. When the QHTML parser finds this tag it fires event OnDocumentGetSize to get dimensions of the document. The client application is supposed to handle such event and respond correctly by setting Width and Height of the document. If both Height and Width are different from 0 after this, the document will be drawn through the OnDocumentDraw event. The QHTML parser expects the client to handle this event in order to draw the document's contents.
FILE An optional parameter to support file documents. When specified it must contain a file name located in whether the current directory or in a directory from the list constructed by AddFilePath. If the specified file cannot be found, the html parser will be passing an empty string for the first parameter of events OnDocumentGetSize and OnDocumentDraw. If the parser finds the file, it will be passing the full file path. ""
PARAM An optional text string to pass extra information in OnDocumentGetSize and OnDocumentDraw. For example, it may contain a number that will identify the type of the document, or in one way or another telling the two event handlers how to treat the document. It can be any information the developer may decide useful, or just not to use this parameter at all. The contents of PARAM will be passed in OnDocumentGetSize and OnDocumentDraw as the second parameter. ""
WIDTH Specifies the width of the document in pixels. This value will be passed in OnDocumentGetSize. When not specified in the tag the client application must handle event OnDocumentGetSize to set a correct value for the document width. If both the WIDTH and HEIGHT parameters are specified in the tag, the client application doesn't need to handle OnDocumentGetSize, although it can in order to override the values passed in the tag. If after calling OnDocumentGetSize one of the parameters WIDTH and HEIGHT is set to 0, event OnDocumentDraw won't happen for such document. 0
HEIGHT Specifies the height of the document in pixels. For more information read about property WIDTH. 0
BORDER Document border width. Each virtual document can have a frame of specified width around it. When OnDocumentDraw is called its X and Y parameters will contain (X + BORDER) and (Y + BORDER), and Width and Height of the document will contain (Width - BORDER * 2) and (Height - BORDER * 2), i.e. the document size will be increased by the size of BORDER * 2. 0
BORDERCOLOR Color of the document border when BORDER is more than 0.
Note: The parser also recognizes abbreviation BC for this attribute.
Blue
BGCOLOR Color of the document background. When OnDocumentDraw is called the document's background has been filled with the specified color. It is an optional attribute, and if not specified, the document's background won't be drawn at all, i.e. it will have the background of the object on which the document is drawn.
Defaults to Black when attribute GFC is used.
GFC Gradient Fill Color. Fills background of the document using gradient color effect from color BGCOLOR to GFC. It defaults to Black color, but won't work unless set explicitly. Black
GRAD Gradient fill direction. Can be one of two values: HOR or VERT to specify Horizontal or Vertical gradient accordingly. HOR
BACKGROUND Background picture for the document, if the RES property is not specified, or resource file, if RES is specified.
Note: The parser also recognizes abbreviation BG for this attribute.
""
RES The same as for tag <TABLE>, property RES. ""
<CONTROL> Embedded Windows Control. It assigns a placeholder within QHTML to a windows control of specified size (attributes WIDTH and HEIGHT). By using dimensions of the control the parser will be able to reserve place of the exact size within QHTML while applying all formatting and alignment operations to it. In order to position correctly the actual control within QHTML a client application should retrieve the exact position of the control in the document by using function GetControlPos of the parser.
Besides the standard attributes described below a client application also can access any custom attribute defined in the tag by using function GetControlAttr or GetControlAttrIdx.
When this tag refers to a windows control of dynamically calculated size (when attributes WIDTH and HEIGHT are not specified) the client will have to handle event OnControlGetSize to tell the parser the exact size of the control.
ID An integer value (positive or negative) different from 0 to uniquely identify this control tag from any other control tags. This value is to be used as a parameter to functions GetControlAttr and GetControlPos of the parser. 0
WIDTH Width of the control in pixels, if it can be specified at design time. If width of the control is unknown the client will have to handle event OnControlGetSize to provide information about width of the control dynamically. 0
HEIGHT Height of the control in pixels, if it can be specified at design time. If height of the control is unknown the client will have to handle event OnControlGetSize to provide information about height of the control dynamically. 0
NAME An optional text string attribute to be passed as a parameter of event OnControlGetSize. A possible use of it is when a control is created dynamically to pass a class name for the control to be created. ""
PARAM An optional text string attribute to be passed as a parameter of event OnControlGetSize. A possible use of it is when a control is created dynamically to pass an initialization parameter for the control to be created. ""
<BODY>Unlike in the standard HTML specification, this tag doesn't open contents of the document with implication to close the document's contents where </BODY> is met. This tag inherited its name from the standard <BODY> tag because it defines global parameters applicable to the whole QHTML contents. This tag is optional, and can be placed into any position inside the QHTML document, and will be recognized correctly. If the QHMTL parser finds more than one <BODY> tag in the QHTML document, it will process only the very first one it meets, and all the following tags <BODY> will be ignored. Because this tag only defines the QHTML document properties it doesn't need to be closed by </BODY>
Interface IVXPQuickHTML selects default values for all parameters of tag <BODY> and all the rest settings by firing event OnSetDefaults. It assumes that a client application or interface will handle this event to setup all the default properties for tag <BODY> and all the rest default settings of the IVXPQuickHTML interface. IVXPQuickHTML fires event OnSetDefaults before it starts processing tag <BODY>, which means that defining tag <BODY> in the QHTML document allows to override some of the default parameters. It doesn't allow to override all the default parameters, only those specified for this tag. In order to be able to setup default values for all the rest parameters the client will have to handle event OnSetDefaults.
Such parameters as margins are to be used by client applications only. Their value do not in any way effect the way IVXPQuickHTML draws the document. IVXPTooltip is a client example of using values of margins when drawing a tooltip.
Besides standard attributes of the tag as described below a client application also can specify any custom attribute, access to which is provided through function GetBodyAttr.
TEXT Default text color in the QHTML document. If not specified in the <BODY> tag, its value is supposed to be set inside the client's implementation of OnSetDefaults, which, for instance, in case of IVXPTooltip it will be the tooltip text color set in the system. Black
FONT Specifies which system font the parser will use as the default one:

CAPT - Caption font in the system used for displaying text in window titles.
SCAPT - Small Caption font in the system used for displaying text within small window titles such as toolbar captions.
MENU - Menu font used in the system for displaying text in menu bars.
TOOL - Tooltip font used in the system for displaying text in tooltips.
SBAR - Status Bar font used in the system for displaying text in window status bars.
MSG - Message box font used in the system for displaying text in dialog and message boxes.

Note:1. The parser is not case-sensitive to names of the system fonts.
2. At present, font names TOOL and SBAR define the same font in the system.
MSG
BGCOLOR Background color of the entire QHTML document. Similar to property TEXT its value is set within OnSetDefaults of the client application or interface. White
GFC Gradient Fill Color. Fills the entire QHTML document using gradient color effect from color BGCOLOR to GFC. It defaults to Black color, but won't work unless set explicitly. Black
GRAD Gradient fill direction. Can be one of two values: HOR or VERT to specify Horizontal or Vertical gradient accordingly. HOR
LEFTMARGIN Left hand margin of the document to be used by client applications. The value doesn't effect drawing by IVXPQuickHTML.
Note: The parser also recognizes abbreviation LM for this attribute.
0
RIGHTMARGIN Right hand margin of the document to be used by client applications. The value doesn't effect drawing by IVXPQuickHTML.
Note: The parser also recognizes abbreviation RM for this attribute.
0
TOPMARGIN Top margin of the document to be used by client applications. The value doesn't effect drawing by IVXPQuickHTML.
Note: The parser also recognizes abbreviation TM for this attribute.
0
BOTTOMMARGIN Bottom margin of the document to be used by client applications. The value doesn't effect the way IVXPQuickHTML draws.
Note: The parser also recognizes abbreviation BM for this attribute.
0
BACKGROUND Background picture for the whole contents drawn by IVXPQuickHTML, if the RES property is not specified, or resource file, if RES is specified.
Note: The parser also recognizes abbreviation BG for this attribute.
""
RES The same as for tag <TABLE>, property RES. ""
<BGSOUND>Background Sound settings. These settings can be used by client applications to provide a sound effect unique for each contents of IVXPQuickHTML. When specified, this tag is managed by the IVXPSound interface available through settings->bgsound. Interface IVXPTooltip is an example of using tag <BGSOUND> to play sound attuned with the tooltip's fading status.
Read documentation on the IVXPSound interface for more details.
FILE A sound file, if RES is not specified, or a resource file, if RES is specified. ""
RES Sound resource in the default resource, if FILE is not specified, or in the resource file specified by parameter FILE.
Format examples:
  1. RES='mp3=#23456', the same as ReS = " mP3 : #23456" - will load resource of type MP3 with ID 23456.
  2. RES='my_sound=idr_sound5', the same as rES = "mY_SoUnD :iDr_SoUnD5 " - will load resource of type MY_SOUND with ID 'IDR_SOUND5'.
""
PARAM Any parameter that can be useful in playing the sound. 0
PLAYFROM Defines contents of parameter Handle of the IVXPSound interface after the parser has finished processing tag <BGSOUND>:
  • GLOBAL - Handle of a globally allocated movable block of memory from the heap containing the sound data, or NULL, if failed. The block of memory will be deallocated automatically.
  • HEAP - Handle of a locally allocated block of memory from the process heap containing the sound data, or NULL, if failed. The allocated block of memory is not movable and not serializable. It will be deleted automatically when no longer needed.
  • STREAM - Pointer to an instance of the IStream interface containing the sound data, or NULL, if failed. The stream will be released automatically when no longer needed.
  • FILE - Handle of the file specified by the FILE attribute, or NULL, if failed. The file will be opened in the read-only mode, and closed automatically.
  • RESOURCE - Handle of the resource file specified by the FILE attribute, or NULL, if failed. The resource file will be loaded as a DataFile, and unloaded automatically.
  • VFILE - Assume that you have to use a third party component to play sound, which only can work with files. Having a few sound files you also would naturally want to put them right into resources of your project instead of storing them as external files. Using the VFILE attribute makes it possible. When specified it requires that attribute RES presents in the tag as well. The parser will extract such resource from the resource file, create a temporary file, open it in the read-only mode, and pass the file handle through property Handle of IVXPSound. In the meantime, FilePath will contain the full path to the temporary file. The file will be closed and deleted automatically.
  • CUSTOM - NULL always.
Read documentation on interface IVXPSound for more details about how parameter PLAYFROM effects functionality of the interface.
CUSTOM
SIZE The size limit for the sound data to be loaded into memory. Allows setting a limit on loading huge amount of sound data into memory at once. The value of 0 indicates that no limit applies. 0
VOLUME Defines a virtual volume parameter of the sound. 0xFFFFFFFF
BALANCE Defines a virtual balance parameter of the sound. 0
FREQUENCY Defines a virtual frequency parameter of the sound. 0
STARTPOS When working with a multi-record sound source defines a virtual start position in the source for the current sound record. 0
ENDPOS When working with a multi-record sound source defines a virtual end position in the source for the current sound record. 0
LOOP Defines how many times the sound must be played. The value of 0 indicates that the sound must be played in a never-ending loop. 1
DELAY Defines a virtual delay before the sound must begin. 0
PAUSE If LOOP <> 1, defines a virtual pause between the end of playing the sound and beginning to play it again. 0
INFO A text string to contain any information about the sound. For instance, if we play songs it can be the song name. ""
<!...>Comment block. Whatever is inside between <! and > is considered as a comment block, and not analyzed.
When drawing a document the parser skips contents of such tags. The idea of this tag is to serve two purposes:
  1. Commenting some complex QHTML for clarity
  2. Hiding some text to be available only when reading QHTML using speech technology. Therefore, contents of comments can be retireved along with the rest of the QHTML document using function GetSpeechText of the IVXPQuickHTML interface. In this function this tag is very similar to tag <&...>
One example of effective usage of comments is the IVXPTooltip interface. It is very efficient to display only some information in a tooltip, while allowing it to read its full contents including all the comments it has.
<&...>Speech tag. Whatever inside the tag the parser treats as a Text-To-Speech contents. This speech contents is to be read using function GetSpeechText
This is another invisible tag, which can be considered a comment tag, but relating only to using speech.

This document was last updated on 19/05/2003
Copyright © 2003 Tooltips.NET