Displaying an HTML Document for Palm-size PC

Once you create the HTML viewer control, you can use the control to display an HTML document.

    To display an HTML document

  1. Clear the current contents of the HTML viewer control by sending it a WM_SETTEXT message.
  2. Load an HTML document and copy the document text to the control by sending the control a series of DTM_ADDTEXT messages for ASCII or DTM_ADDTEXTW messages for Unicode.
  3. When the document processing is complete, send the control a DTM_ENDOFSOURCE message.
  4. Process any NM_HOTSPOT notifications sent by the control when the user taps a link or submits a form.
  5. For each NM_INLINE_IMAGE notification received from the control, load the image so that the HTML viewer control will display the image-loading icon.
  6. After the image has loaded successfully, send the control a DTM_SETIMAGE message containing the bitmap handle (HBITMAP) of the image to display.

    If the image does not load successfully, send a DTM_IMAGEFAIL message, which indicates to the control that it should display the broken image icon.

  7. For each NM_INLINE_SOUND notification received from the control, load the sound, and then play it the number of times indicated in the dwLoopCount parameter.