Page 1
Page 2
Page 3
Introduction
In
the first article 'Saddling
HTML Viewer Control' I showed you the way to create the HTML viewer control
in eVB using Platform SDK API calls. We managed to show simple html in the control
and were able to implement some of the functionality of the HTML Viewer Control
such as selecting, copying, text zooming and scrolling. In this article I'll show
you that we are able to implement the fully functional HTML viewer control that
handles 'links', 'html form' submission, pictures and some more stuff, with the
help of the MessageCE control I created.
Background
Let's
start from some background on how the HTML viewer control handles links and pictures
accordingly to the Windows CE Platform SDK documentation that comes with eMbedded
Tools.
If the user taps on a link or submits a form, the HTML viewer control
sends the NM_HOTSPOT notification message to its parent, which includes the data
structure (NM_HTMLVIEW) with the information about the link reference or the data
that was submitted. In the case there is a picture in the html loaded into the
control, it will send NM_INLINE_IMAGE notification message with the same data
structure, but with the name of the picture file. In the response on this message
the Parent is supposed to load this file into the memory and send the DTM_SETIMAGE
message with the pointer to the memory of the loaded picture... So much for the
simple process of showing the picture, right? Well, worry no more. The subclassing
control MessageCE will handle that impossible for eVB situation for you.
So
what is this subclassing control anyway? It's a COM component that will hook into
the messages of the forms and controls and will notify your eVB application of
those messages. I specifically designed the MessageCE control to handle the subclassing
and processing of the HTML Viewer control messages.
Implementation
We
are going to start from the eVB project we created last time for first
article. You will need to download the MessageCE component from http://intelprog.com/prod02.htm
and register it on your device using Control Manager.
We'll
start from adding some html lines to the HTML Viewer control for showing links
and html form.
Next Page