QHTM - Quick, Light HTML Control


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

[What Does It Do?] [HTML Support/Restrictions] [Download It!]

What does it do?

QHTM is a control you can use to display HTML on a dialog or in your main window of your applications. Adding it into your application is as simple as either using CreateWindow or adding the control to your dialogs. You can give it plain HTML text by simply using the SetWindowText(...) API, or, if you have more that just text you want to use you can use the single API that will read from your resources. If that is not enough it will also read files from a local drive.

QHTM started life as a part of one of my own projects, it has since grown into a full control that anyone can download and use.

QHTM is a DLL of about 200k, with no requirements for any other DLLs or support files.

QHTM is not a browser, it will not directly display anything from the internet, nor will it directly load web pages from a hard drive. It is primarily designed as a static control, a static control that can display PNG files, multiple tables of data with all of the HTML formatting you would expect.

You could use QHTM as an enhanced static control, QHTM HTML input does not have to be a full HTML file, something like "This is <b>bold</b>" is enough. I use QHTM to display data in a better way than just blaming text onto a dialog. You can use QHTM to allow the user to make selections by clicking on hyperlinks. You could use QHTM as a groovy version of scrolling credits on your about box.

QHTM is useable from any Win32 programming language that can call a 'C' callable function, can register a Windows message and use CreateWindow. It does not use MFC but is quite happy being used from an MFC or a Win32 API application.


HTML Support and Restrictions

Most of the restrictions are related to either speed or complexity. In most cases they will not trouble you at all. If any of the restrictions or unsupported features bother you then drop me a line and I am sure we can work something out.

Image support is currently limited to PNG, I cannot do GIF due to the licencing issues with UNISYS. Transparent images are not yet supported. PNG does not properly support animation so there is not yet any animation. Both of these will be resolved in the near future.

QHTM displays tables, and tables (or entire documents) within tables etc. It does not have column or row spanning. It will treat the first row description as the description for the entire table. Table borders are not yet supported.

Background bitmaps are not supported. I have no plans to support this.

QHTM has no forms support. There is no scripting or dynamic HTML.

For a full list of all the supprted tags see Tags.doc in the ZIP file below.



QHTM is Copyright Russell Freeman 1999.

If you redistribute QHTM, you should redistribute the whole library including documentation and copyright. In no event may any part of the library be distributed without this copyright notice.
If you use of QHTM in your program, you must acknowledge this, preferably in the about box and the documentation. This should take the form of "contains QHTM code. QHTM is copyright (c) 1999 Russell Freeman.". The documentation must also contain this notice.

The QHTM code is supplied "AS IS". Russell Freeman and other authors disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The authors assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of QHTM, even if advised of the possibility of such damage.

QHTM contains paintlib code. paintlib is copyright (c) 1996-1998 Ulrich von Zadow.



If you would like to be informed of updates to QHTM then send an email to russf@gipsysoft.com.

The ZIP file below includes an MFC example of how to use QHTML. The About box has HTML displayed on it and there is a demonstration of loading a HTML file on the View menu.

Click to download QHTML — 155KB


  • Selection in QHTM

    Posted by elevener on 04/18/2006 09:55am

    Is it possible to add the possibility to select via UI part of rendered HTML and get programmatically selected HTML?

  • Intercepting Hyperlink Clicks

    Posted by Legacy on 05/04/2000 07:00am

    Originally posted by: David Berman

    Is there any sample code that shows how to do this? I'm having some trouble. When you click on a hyperlink, I want to receive the QHTM_HYPERLINK_MESSAGE and have my
    function called.

    I'm not quite sure how to do this. Thank you.


  • If GIF is a no-go, what about JPEG?

    Posted by Legacy on 04/26/2000 07:00am

    Originally posted by: J�rgen Voss

    Aside from the controversy issue, I feel that JPEG support is missing (otherwise this stuff is great!). There is a library (libjpeg.a) floating around on the web, I just don't happen to have the URL handy. It is in source code and you are free to use it, provided you credit the authors (where it is due). I once used in a commercial project and it compiles under almost any platform as long as you have a C compiler, yet it is object oriented (looks funny, C++ code written in C).

    I feel your library would benefit greatly from this enhancement; while GIF (and PNG) is OK to display schematics and/or simple graphics, nothing really beats JPEG when it comes to displaying rendered photos or when it is acceptable to have minor losses for a space trade-off.


  • Error when compled by VC++ 5.0

    Posted by Legacy on 04/22/1999 07:00am

    Originally posted by: Bob

    The error appared when I compile with VC++ 5.0.
    afxdtctl.h was missing...
    How to get it or what i can do?

  • Problem compiling in VC++ 5.0

    Posted by Legacy on 04/09/1999 07:00am

    Originally posted by: Anup Pant

    Modified the CMainFrame::OnCreate() to use older way of creating toolbar and statusbar. Then tried compiling program in VC++ 5.0.

    Got the following error. I have enough space in my HD.

    ------Configuration: MFCExample - Win32 Debug ---------
    QHTM.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x36b43f28
    Error executing link.exe.

    MFCExampleD.exe - 1 error(s), 0 warning(s)

    May be a VC++ 5.0 build of the QHTM.lib may solve the problem.

    Any comments ???


  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date