<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Mike Francis: My Mobile Home - Web Browser Control</title>
    <link>http://blog.mjfnet.com/Blog/</link>
    <description>focusing on mobile application development...</description>
    <image>
      <url>http://www.mjfnet.com/blog/images/mikehead.jpg</url>
      <title>Mike Francis: My Mobile Home - Web Browser Control</title>
      <link>http://blog.mjfnet.com/Blog/</link>
    </image>
    <language>en-us</language>
    <copyright>Mike Francis</copyright>
    <lastBuildDate>Wed, 22 Jul 2009 20:24:00 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mike@mjfnet.com</managingEditor>
    <webMaster>mike@mjfnet.com</webMaster>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=94e6069a-4768-4f06-a68f-675f31f805e8</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,94e6069a-4768-4f06-a68f-675f31f805e8.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,94e6069a-4768-4f06-a68f-675f31f805e8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=94e6069a-4768-4f06-a68f-675f31f805e8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In my previous post (<a href="http://blog.mjfnet.com/Blog/2009/07/21/WindowsMobile65WebBrowserControlEnablingGestureSupport.aspx">Windows
Mobile 6.5 Web Browser Control: Enabling Gesture support</a>), I discussed how you
can enable the built-in gesture support of the web browser control in Windows Mobile
6.5.  Basically you disable selection support when creating the control, and
the gesture support is enabled. But what if you want to select within the control.
It seems that selection and gestures are mutually exclusive. 
</p>
        <p>
Yes. You can’t select and use gestures at the same time. However you can switch into
‘selection mode’ when needed. The following video shows the how this is used in the
Windows Mobile messaging application:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; width: 425px; padding-right: 10px; display: inline; float: left; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:77e6abbf-749e-4abf-b888-00491f3ccfe8" class="wlWriterSmartContent">
          <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="12ccc3ce-9ed3-471a-b004-c3d85cf2177d">
            <div>
              <embed height="355" type="application/x-shockwave-flash" width="425" src="http://www.youtube.com/v/a6BWZU0e1qU&amp;hl=en">
              </embed>
            </div>
          </div>
        </div>
        <p>
 
</p>
        <p>
In this video, I use gestures (flick) to scroll down the email message to locate a
block of text I want to copy.
</p>
        <p>
To get into ‘selection mode’, I press Menu | Make Selection. I then select the block
of text, tap and hold to bring up the context menu and press Copy.
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
To add this functionality to your Web Browser control application, we will need access
to the controls COM interface. Fortunately the ‘<a href="http://msdn.microsoft.com/en-us/library/bb159830.aspx">HTML
control</a>’ provides access to this via the <a href="http://msdn.microsoft.com/en-us/library/bb415471.aspx">DTM_BROWSERDISPATCH</a> message.
The following code demonstrates how to access the IBrowser3::put_SelectionEnabled
method to enable / disable ‘selection mode’:
</p>
        <div id="codeSnippetWrapper">
          <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">HRESULT SetSelectionMode(HWND hWndHtml, BOOL bSelect)<br />
{<br />
LPDISPATCH pDisp=NULL;<br /><span style="color: #008000">// Get the dispatch interface</span><br />
SendMessage(hWndHtml, DTM_BROWSERDISPATCH , 0, (LPARAM) &amp;pDisp);<br /><span style="color: #0000ff">if</span> (pDisp==NULL)<br /><span style="color: #0000ff">return</span> -1;<br /><span style="color: #008000">// The put_SelectionEnabled method is included in the
IBrowser3 interface</span><br />
IBrowser3 * pBrowser3;<br />
HRESULT hRes = pDisp-&gt;QueryInterface(IID_IBrowser3, (LPVOID*)&amp;pBrowser3);<br />
hRes = pBrowser3-&gt;put_SelectionEnabled(bSelect ? VARIANT_TRUE: VARIANT_FALSE );<br />
pBrowser3-&gt;Release();<br /><span style="color: #0000ff">return</span> hRes;<br />
}</pre>
          <br />
        </div>
        <p>
So where does the IBrowser3 interface come from? This was supported in an earlier
version of the browser, but has since been deprecated. However, the control is still
using this interface. The interface definition is located in 
</p>
        <p>
          <font face="Courier New">C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\PocketPC2003\Include\webvw.h</font>
        </p>
        <p>
I copied this over to my project directory and renamed it: webwv2.h 
</p>
        <p>
You can download the BrowserWithGestures sample code project (VS2008) <a href="http://cid-e91b74403814953e.skydrive.live.com/self.aspx/BrowserWithGestures/BrowserWithGestures.zip">here</a>. 
</p>
        <p>
Note that the information above is not documented by Microsoft and is therefore not
supported. (i.e. if you call Microsoft Developer Support you may be turned away since
only documented / published APIs are supported.)
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9b2ddb30-26b4-42a7-9b22-2f5187bd78eb" class="wlWriterSmartContent">del.icio.us
Tags: <a href="http://del.icio.us/popular/gestures" rel="tag">gestures</a>, <a href="http://del.icio.us/popular/windowsmobile" rel="tag">windowsmobile</a>, <a href="http://del.icio.us/popular/6.5" rel="tag">6.5</a></div>
      </body>
      <title>Windows Mobile 6.5 Web Browser Control: Enabling Selection support</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,94e6069a-4768-4f06-a68f-675f31f805e8.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/07/22/WindowsMobile65WebBrowserControlEnablingSelectionSupport.aspx</link>
      <pubDate>Wed, 22 Jul 2009 20:24:00 GMT</pubDate>
      <description>&lt;p&gt;
In my previous post (&lt;a href="http://blog.mjfnet.com/Blog/2009/07/21/WindowsMobile65WebBrowserControlEnablingGestureSupport.aspx"&gt;Windows
Mobile 6.5 Web Browser Control: Enabling Gesture support&lt;/a&gt;), I discussed how you
can enable the built-in gesture support of the web browser control in Windows Mobile
6.5.&amp;nbsp; Basically you disable selection support when creating the control, and
the gesture support is enabled. But what if you want to select within the control.
It seems that selection and gestures are mutually exclusive. 
&lt;/p&gt;
&lt;p&gt;
Yes. You can’t select and use gestures at the same time. However you can switch into
‘selection mode’ when needed. The following video shows the how this is used in the
Windows Mobile messaging application:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; width: 425px; padding-right: 10px; display: inline; float: left; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:77e6abbf-749e-4abf-b888-00491f3ccfe8" class="wlWriterSmartContent"&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="12ccc3ce-9ed3-471a-b004-c3d85cf2177d"&gt;
&lt;div&gt;&lt;embed height="355" type="application/x-shockwave-flash" width="425" src="http://www.youtube.com/v/a6BWZU0e1qU&amp;amp;hl=en"&gt;&lt;/embed&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
In this video, I use gestures (flick) to scroll down the email message to locate a
block of text I want to copy.
&lt;/p&gt;
&lt;p&gt;
To get into ‘selection mode’, I press Menu | Make Selection. I then select the block
of text, tap and hold to bring up the context menu and press Copy.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
To add this functionality to your Web Browser control application, we will need access
to the controls COM interface. Fortunately the ‘&lt;a href="http://msdn.microsoft.com/en-us/library/bb159830.aspx"&gt;HTML
control&lt;/a&gt;’ provides access to this via the &lt;a href="http://msdn.microsoft.com/en-us/library/bb415471.aspx"&gt;DTM_BROWSERDISPATCH&lt;/a&gt; message.
The following code demonstrates how to access the IBrowser3::put_SelectionEnabled
method to enable / disable ‘selection mode’:
&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;HRESULT SetSelectionMode(HWND hWndHtml, BOOL bSelect)&lt;br&gt;
{&lt;br&gt;
LPDISPATCH pDisp=NULL;&lt;br&gt;
&lt;span style="color: #008000"&gt;// Get the dispatch interface&lt;/span&gt;
&lt;br&gt;
SendMessage(hWndHtml, DTM_BROWSERDISPATCH , 0, (LPARAM) &amp;amp;pDisp);&lt;br&gt;
&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (pDisp==NULL)&lt;br&gt;
&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; -1;&lt;br&gt;
&lt;span style="color: #008000"&gt;// The put_SelectionEnabled method is included in the
IBrowser3 interface&lt;/span&gt;
&lt;br&gt;
IBrowser3 * pBrowser3;&lt;br&gt;
HRESULT hRes = pDisp-&amp;gt;QueryInterface(IID_IBrowser3, (LPVOID*)&amp;amp;pBrowser3);&lt;br&gt;
hRes = pBrowser3-&amp;gt;put_SelectionEnabled(bSelect ? VARIANT_TRUE: VARIANT_FALSE );&lt;br&gt;
pBrowser3-&amp;gt;Release();&lt;br&gt;
&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; hRes;&lt;br&gt;
}&lt;/pre&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;p&gt;
So where does the IBrowser3 interface come from? This was supported in an earlier
version of the browser, but has since been deprecated. However, the control is still
using this interface. The interface definition is located in 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\PocketPC2003\Include\webvw.h&lt;/font&gt; 
&lt;p&gt;
I copied this over to my project directory and renamed it: webwv2.h 
&lt;p&gt;
You can download the BrowserWithGestures sample code project (VS2008) &lt;a href="http://cid-e91b74403814953e.skydrive.live.com/self.aspx/BrowserWithGestures/BrowserWithGestures.zip"&gt;here&lt;/a&gt;. 
&lt;p&gt;
Note that the information above is not documented by Microsoft and is therefore not
supported. (i.e. if you call Microsoft Developer Support you may be turned away since
only documented / published APIs are supported.)
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9b2ddb30-26b4-42a7-9b22-2f5187bd78eb" class="wlWriterSmartContent"&gt;del.icio.us
Tags: &lt;a href="http://del.icio.us/popular/gestures" rel="tag"&gt;gestures&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/windowsmobile" rel="tag"&gt;windowsmobile&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/6.5" rel="tag"&gt;6.5&lt;/a&gt;
&lt;/div&gt;</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,94e6069a-4768-4f06-a68f-675f31f805e8.aspx</comments>
      <category>Web Browser Control</category>
    </item>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=36b70b0b-94a6-410c-ab6e-fb707cf3e701</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,36b70b0b-94a6-410c-ab6e-fb707cf3e701.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,36b70b0b-94a6-410c-ab6e-fb707cf3e701.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=36b70b0b-94a6-410c-ab6e-fb707cf3e701</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the most powerful controls in the Windows Mobile developer toolbox is the Web
Browser control. With this control, you can create applications as simple as displaying
HTML, to more complex apps that interact with the DOM manipulating elements, and fining
/ responding to events.
</p>
        <p>
The introduction of touch and gesture support in Windows Mobile 6.5 has greatly improved
the user experience. You can now intuitively flick and pan with your finger in most
of the Microsoft applications and your own! Adding gesture support to your application
is not trivial. See the <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=20686a1d-97a8-4f80-bc6a-ae010e085a6e">Windows
Mobile 6.5 Developer Tool Kit</a> (DTK) for more information.  Fortunately Microsoft
has included gesture support in the Web Browser control for 6.5
</p>
        <p>
There are actually two web browsers in Windows Mobile 6.5. One that is used by Internet
Explorer Mobile and another that is used by applications hosting the Web Browser control.
This post will focus on the later. 
</p>
        <p>
There are two ways to instantiate the web browser control. The first method uses a
COM interface to create the control. (See the <a href="http://msdn.microsoft.com/en-us/library/ms881532.aspx">miniPie</a> SDK
sample.) The second method hosts the control as a child of a <a href="http://msdn.microsoft.com/en-us/library/ms854252.aspx">DISPLAYCLASS</a> window
(The docs refer to this as the ‘<a href="http://msdn.microsoft.com/en-us/library/bb159830.aspx">HTML
control</a>’). In order to create this control with gesture support, you create it
with the <a href="http://msdn.microsoft.com/en-us/library/ms854252.aspx">HS_NOSELECTION</a> flag.
For example:
</p>
        <p>
        </p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">hWndHtml = CreateWindow(TEXT(<span style="color: #006080">"DISPLAYCLASS"</span>),
NULL,</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        WS_VISIBLE | HS_NOSELECTION,0 , 0, GetSystemMetrics(SM_CXSCREEN),</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        GetSystemMetrics(SM_CYSCREEN), hWnd, NULL, g_hInst, NULL);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
You can see this for yourself:
</p>
        <ol>
          <li>
Open the <a href="http://msdn.microsoft.com/en-us/library/aa455117.aspx">Browse SDK
sample</a></li>
          <li>
Add the HS_NOSELECTION flag (as shown above) to the DISPLAYCLASS CreateWindow call 
</li>
          <li>
Build and Run</li>
        </ol>
        <p>
In the video below, I changed the sample to load an HTML file that contained more
than a screen full of data in order to force scrolling so that you can see the navigation
via gestures (Flick and Pan):
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b9f3760a-ccea-4907-94f3-a446debf9601" class="wlWriterSmartContent">
          <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="766ea540-5e0a-4d01-8135-4e0dd9bf2cfb">
            <div>
              <embed height="355" type="application/x-shockwave-flash" width="425" src="http://www.youtube.com/v/bzzdxRFXP3M&amp;hl=en">
              </embed>
            </div>
          </div>
        </div>
        <p>
Additional Resources:
</p>
        <ul>
          <li>
            <a title="http://blogs.msdn.com/marcpe/archive/2009/06/29/let-s-talk-about-touch-part1.aspx" href="http://blogs.msdn.com/marcpe/archive/2009/06/29/let-s-talk-about-touch-part1.aspx">Let’s
Talk About Touch (Part1)</a>
          </li>
          <li>
            <a href="http://msdn.microsoft.com/en-us/library/ee220920.aspx">Using Gestures in
Windows Mobile 6.5</a>
          </li>
          <li>
            <a href="http://developers.windowsmobile.com">Windows Mobile Developers site</a>
          </li>
        </ul>
        <p>
Note that the information above is not documented by Microsoft and is therefore not
supported. 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:dfe94aec-555b-474f-b92c-914d7aefa1d2" class="wlWriterEditableSmartContent">del.icio.us
Tags: <a href="http://del.icio.us/popular/gestures" rel="tag">gestures</a>,<a href="http://del.icio.us/popular/windowsmobile" rel="tag">windowsmobile</a>,<a href="http://del.icio.us/popular/6.5" rel="tag">6.5</a></div>
      </body>
      <title>Windows Mobile 6.5 Web Browser Control: Enabling Gesture support</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,36b70b0b-94a6-410c-ab6e-fb707cf3e701.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/07/21/WindowsMobile65WebBrowserControlEnablingGestureSupport.aspx</link>
      <pubDate>Tue, 21 Jul 2009 02:40:59 GMT</pubDate>
      <description>&lt;p&gt;
One of the most powerful controls in the Windows Mobile developer toolbox is the Web
Browser control. With this control, you can create applications as simple as displaying
HTML, to more complex apps that interact with the DOM manipulating elements, and fining
/ responding to events.
&lt;/p&gt;
&lt;p&gt;
The introduction of touch and gesture support in Windows Mobile 6.5 has greatly improved
the user experience. You can now intuitively flick and pan with your finger in most
of the Microsoft applications and your own! Adding gesture support to your application
is not trivial. See the &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=20686a1d-97a8-4f80-bc6a-ae010e085a6e"&gt;Windows
Mobile 6.5 Developer Tool Kit&lt;/a&gt; (DTK) for more information.&amp;nbsp; Fortunately Microsoft
has included gesture support in the Web Browser control for 6.5
&lt;/p&gt;
&lt;p&gt;
There are actually two web browsers in Windows Mobile 6.5. One that is used by Internet
Explorer Mobile and another that is used by applications hosting the Web Browser control.
This post will focus on the later. 
&lt;/p&gt;
&lt;p&gt;
There are two ways to instantiate the web browser control. The first method uses a
COM interface to create the control. (See the &lt;a href="http://msdn.microsoft.com/en-us/library/ms881532.aspx"&gt;miniPie&lt;/a&gt; SDK
sample.) The second method hosts the control as a child of a &lt;a href="http://msdn.microsoft.com/en-us/library/ms854252.aspx"&gt;DISPLAYCLASS&lt;/a&gt; window
(The docs refer to this as the ‘&lt;a href="http://msdn.microsoft.com/en-us/library/bb159830.aspx"&gt;HTML
control&lt;/a&gt;’). In order to create this control with gesture support, you create it
with the &lt;a href="http://msdn.microsoft.com/en-us/library/ms854252.aspx"&gt;HS_NOSELECTION&lt;/a&gt; flag.
For example:
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;hWndHtml = CreateWindow(TEXT(&lt;span style="color: #006080"&gt;"DISPLAYCLASS"&lt;/span&gt;),
NULL,&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        WS_VISIBLE | HS_NOSELECTION,0 , 0, GetSystemMetrics(SM_CXSCREEN),&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        GetSystemMetrics(SM_CYSCREEN), hWnd, NULL, g_hInst, NULL);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
You can see this for yourself:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Open the &lt;a href="http://msdn.microsoft.com/en-us/library/aa455117.aspx"&gt;Browse SDK
sample&lt;/a&gt; 
&lt;li&gt;
Add the HS_NOSELECTION flag (as shown above) to the DISPLAYCLASS CreateWindow call 
&lt;li&gt;
Build and Run&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In the video below, I changed the sample to load an HTML file that contained more
than a screen full of data in order to force scrolling so that you can see the navigation
via gestures (Flick and Pan):
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b9f3760a-ccea-4907-94f3-a446debf9601" class="wlWriterSmartContent"&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="766ea540-5e0a-4d01-8135-4e0dd9bf2cfb"&gt;
&lt;div&gt;&lt;embed height="355" type="application/x-shockwave-flash" width="425" src="http://www.youtube.com/v/bzzdxRFXP3M&amp;amp;hl=en"&gt;&lt;/embed&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Additional Resources:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a title="http://blogs.msdn.com/marcpe/archive/2009/06/29/let-s-talk-about-touch-part1.aspx" href="http://blogs.msdn.com/marcpe/archive/2009/06/29/let-s-talk-about-touch-part1.aspx"&gt;Let’s
Talk About Touch (Part1)&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ee220920.aspx"&gt;Using Gestures in
Windows Mobile 6.5&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://developers.windowsmobile.com"&gt;Windows Mobile Developers site&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Note that the information above is not documented by Microsoft and is therefore not
supported. 
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:dfe94aec-555b-474f-b92c-914d7aefa1d2" class="wlWriterEditableSmartContent"&gt;del.icio.us
Tags: &lt;a href="http://del.icio.us/popular/gestures" rel="tag"&gt;gestures&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/windowsmobile" rel="tag"&gt;windowsmobile&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/6.5" rel="tag"&gt;6.5&lt;/a&gt;
&lt;/div&gt;</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,36b70b0b-94a6-410c-ab6e-fb707cf3e701.aspx</comments>
      <category>Web Browser Control</category>
    </item>
  </channel>
</rss>