The HTML MessageBox

from Cooperstock Software

HTML Support (case-insensitive):

  • <B>...</B>, <I>...</I> and <U>...</U>
  • <FONT [size=sizeInPoints] [face=fontName] [color=value]>...</FONT>,
  • <BR> (can optionally be replaced by newlines)
  • The entities &lt;, &gt;, &amp; and &nbsp;

General Features

  • The API is an exact replacement for the Windows MessageBox API function.
  • The default font for the MessageBoxes is Arial 10 (much larger and more readable that the standard Windows MessageBox font), and you can change that default as desired.
  • It auto-sizes to exactly fit the text (or HTML) being displayed.
  • Long lines are word wrapped.
  • It is centered on your screen.
  • Unlike the standard Windows MessageBox, it will never be wider than your screen, or taller than your screen. (In fact, it tries to avoid being more than about 90% of the width or height of your screen.)

DLL Size

  • The main DLL, HtmlMessageBox.dll, is about 300K.
  • The COM wrapper HtmlMessageBoxCom.dll, if you choose to use it, is another 90K.

API Functions

  • Each function has two names, the first is for the standard Win32 API calling calling convention, the 2nd is for use in object-based calling situations like COM and .NET.
  • HtmlMessageBox() / Show(): Shows the MessageBox, identical API to the Windows API.
  • HtmlMessageBoxSetDefaultFontFace() / SetDefaultFontFace()
  • HtmlMessageBoxSetDefaultPointSize() / SetDefaultPointSize()
  • HtmlMessageBoxSetNewlineIsBreak() / SetNewlineIsBreak(): If called with a non-zero argument, newline (or carriage return followed by newline) is treated as a <BR>.

Calling Interfaces

  • Standard Win32 Windows API calling convention (C/C++)
  • COM object
  • .NET class with static/shared functions and constants (sample C# and VB.NET code included)
  • PowerBuilder (non-visual object that replicates the PowerBuilder MessageBox function's API included)

Limitations / Requirements

  • Only Unicode MessageBoxes are currently supported.
  • Runs on Windows 2000, XP, Vista, 2003 or higher.
  • HTML elements like hyperlinks, images (except the standard MessageBox icons displayed via codes in the flags argument to the main HtmlMessageBox function), 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.
© Cooperstock Software | Privacy Policy | Site Map | Have a question? Email us or call (416) 423-7722.