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
- Clear the current contents of the HTML viewer control by sending it a WM_SETTEXT message.
- 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.
- When the document processing is complete, send the control a DTM_ENDOFSOURCE message.
- Process any NM_HOTSPOT notifications sent by the control when the user taps a link or submits a form.
- 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.
- 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.
- 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.