BRDGHTM2 Information for Programmers

BRDGHTM2.DLL contains routines for creating HTML documents to display bridge hands.

BRDGHTM2.DLL is available on a freeware/shareware basis. It is completely functional as freeware, but it will display a five-second self-advertisement when the DLL is loaded. The routine necessary to suppress the ad is supplied to programmers who register the DLL as shareware.

BRDGHTM2.DLL and the related gif files are distributed with Duper.

Creating HTML documents with BRDGHTM2 consists of these steps:

  1. Add all the deals you want displayed to a queue, using the AddDeal routine.
  2. Create the HTML document, which will show all deals in the queue, by calling either of the HTML-creation routines, HTMLCustom or HTMLDef. The only difference between these routines is that the 'custom' routine uses a large number of parameters to give the user more control over the resulting HTML document. The 'defaults' routine, HTMLDef, takes fewer parameters and uses many default values, all of which should be acceptable for purposes of American English. (British English speakers might prefer 'All' to 'Both' when describing vulnerability; if so, they should use HTMLCustom. Speakers of languages other than English will almost certainly want to use HTMLCustom.)
  3. Clear the deal queue, using ClearDeals.

GIFs

It would make life much easier to use fonts rather than gifs for the suit symbols. Unfortunately, although the necessary fonts can be read on most platforms, they can't be read on all. Accordingly, the documents created by BRDGHTM2.DLL expect gifs for the suit symbols. In addition, they expect a gif representing the direction indicators in the middle of each deal. Those five gifs (spade.gif, heart.gif,diamond.gif, club.gif, and board.gif) are distibuted with BRDGHTM2.DLL.

The dimensions of the gifs are coded into the HTML documents created by BRDGHTM2.DLL, so if you use gifs other than the ones supplied with the DLL, you may have to do some editing of the HTML documents it creates.

While the DLL anticipates that users may want to use terms other than the English ones ('N','E','S','W'), board.gif does use those letters. Several non-English alternatives to board.gif are distributed with Duper. Any one of those alternative gifs may be used with the html code generated by BRDGHTM2 by the simple expedient of renaming it 'board.gif'.

If none of the supplied board gifs reflect the language you want to use, you can create your own. The gif you create should be 50 pixels by 50 pixels, the dimensions anticipated by the HTML documents created by the DLL. (Creating such a gif is a pretty simple operation. If you have trouble, let me know and I'll be happy to create one for your language myself.)

Routines and parameters

Important note:

All parameters passed to the routines must be passed using the Windows stdcall calling convention. Please consult your compiler documentation on this calling convention.

BRDGHTML2 exports five routines. They are AddDeal, ClearDeals, HTMLCustom, HTMLDef, and AbortAd. Each is described below.

AddDeal

ClearDeals

HTMLCustom

HTMLDef

AbortAd

Registering BRDGHTM2.DLL

To register BRDGTHML.DLL, snail mail the following information and US $25 to:

David Howorth
1420 South 10th Street
Oxford, Mississippi 38655

or send $25 via PayPal to howorthd@bellsouth.net.

In either case, please supply the following information:

The information necessary to suppress the BRDGHTM2 self-advertisement will be supplied by email.