HTML Recognized by the MessageBox
|Top Previous Next|
All HTML tags and attribute names in the HTML recognized by the HTML MessageBox are case-insensitive.
The following tags are recognized:
Closing tags are never required - if a tag is not closed, its meaning extends to the end of the text. Nesting is not implemented, so for instance if a 2nd <FONT> tag appears before a first one has been closed, it completely replaces the meaning of the first one (including default attribute values), rather than adding to its meaning as in standard HTML.
FONT Tag Attributes:
The following are the attributes of the FONT tag. All are optional, and case-insensitive. The attribute values can be quoted with double quotes, or unquoted (though the FONT FACE name must be quoted if it contains spaces). Spaces are not allowed around the equal sign in an attribute.
The hard-coded font color names (again, case-insensitive) that the COLOR attribute currently recognizes are white, dkgray, ltgray, yellow, dkyellow, red, dkred, green, dkgreen, blue, dkblue, cyan, dkcyan, magenta, dkmagenta, cloudblue, orange and purple.
The following HTML entities are recognized by the program, largely to ensure that if you actually want to display something like "<B>" in the MessageBox, you can do so:
Having said this, the way the parser works you would probably almost never need either the > or & entities, and even the < entity would only be needed if it was followed by a tag. E.g. "1 < 2" would come through fine, as would "<SomeWord>" or "Bob & Carol". It's only if you want to actually display text in your MessageBox like "<B>" or "the entity for ampersand is &", say, that you would have to change them to "<B>" (or even "<B>") or "the entity for ampersand is &amp;" respectively.
Other HTML-like Behaviour
Spaces (or other whitespace) following a line break are ignored. All whitespace (carriage returns, newlines, and tabs) are treated as if they were spaces, unless HtmlMessageBoxSetNewlineIsBreak(1) has been called, in which case newline, or carriage return newline, is converted to "<BR>".
Multiple spaces are merged into single spaces, unless separated by tags. So, in "foo bar", only one space will show. But in "<b>foo </b> bar", two spaces will show.
To really show spaces in either of the above situations, use .
What's Not Included
If it's not mentioned above, it's not included! That means things like hyperlinks, images (except the standard MessageBox icons displayed via codes in the flags argument to HtmlMessageBox), embedded objects like videos, etc., are not supported. In my humble opinion, none of those are needed for the purpose this product is intended for, which is to make your MessageBoxes more usable and readable.