Log files are useful things. They are used in programs to display the values or variables or other useful information such as what the program is doing. This is useful is the program crashes at some point or is not behaving as it should. By writing values and events to a log you can check back and see what happened! Most logs are text files, which take a while to search though and arent very easy to debug. HTML files however support different colours for different events (ie green text if it worked, red if its an error....) and images (so you can dump screenshots ect). The following code forms the basis to create a log file in HTML which has icons and font colours to show what type of event happened and also is tabulated so it is easy to read.
To make it work you need 3 bmps to use as icons (i recommend 16x16). I have files for download, check in the main forums. Run it and look at the resulting HTML file. Enjoy! :)