Chris De Herrera's Windows CE Website

About
Discuss.Pocket PC FAQ Forum
Add Pocket PC FAQ to your Favorites
RSS    RSS Feeds
Wiki    Lost?
Subscribe    Print

Developer

Miscellaneous
Table of Contents
Mobile Format

[an error occurred while processing this directive]


 
Pocket PC Magazine Best Site

Website Awards
Website Updates

By Chris De Herrera 
Copyright 1998-2007
 All Rights Reserved
A member of the Talksites Family of Websites

Windows and Windows CE are trademarks of Microsoft
Corporation
and are used
under license from owner.
CEWindows.NET is not
associated with Microsoft 
Corporation.

All Trademarks are owned
by their respective companies.

HTMLViewer
By Terence "Dr. CE" Goggin
Copyright 2000, 2001 Terence Goggin
 Version 1.00  Revised 4/20/01

[an error occurred while processing this directive]

Topics

1. Is there a control that will allow me to display HTML inside my application?
2. Where can I find a sample that shows how to use the HTMLViewer control?
3. Does the HTMLView control offer the IWebBrowser interface or anything like that?
4. How can I get the IWebBrowser interface?
5. How can I load graphics besides BMPs? I want to use JPEGs & GIFs, but HTMLView doesn't seem to do that.
6. How can I use ClearType in my HTMLView-based applications?



1. Is there a control that will allow me to display HTML inside my application?
Yes, it's called the HTMLViewer control.



2. Where can I find a sample that shows how to use the HTMLViewer control?
The HTMLViewer sample included with the HPC Pro SDK should work
just fine for any of the CE platforms.

It's usually found under
%Windows CE Tools%\wce211\MS HPC Pro\samples\win32\htmlview



3. Does the HTMLView control offer the IWebBrowser interface or anything like that?
No. The HTMLView control is a standard "classic" Windows-based
control, much like a Button or an Edit control. There's no COM or
Interfaces involved at all.



4. How can I get the IWebBrowser interface?
It's supposedly available as part of PlatformBuilder, which means that if you're
building your own custom device, you may well be in luck.

If you're targeting a retail device, though, you'll have to resort to changing your
code to use the HTMLView control instead.



5. How can I load graphics besides BMPs? I want to use JPEGs & GIFs, but HTMLView doesn't seem to do that.
Yes, there is a way to get HTMLView to show images other than BMPs. The
trick is that you have to load the images yourself. I recommend using
something like the image decomp library that ships with CE. (There is a
good sample at the URL below.)

When the HTMLView control encounters an < IMG>   tag, it will send a
WM_NOTIFY message back to the parent window. This is where the app can
load the image specified and return an HBITMAP to the HTMLView control.
(It's much simpler than it sounds.)


For more information: http://www.conduits.com

6. How can I use ClearType in my HTMLView-based applications?


SendMessage(hwndHTML, DTM_ENABLECLEARTYPE, 0, 0);


[an error occurred while processing this directive]

Terence Goggin's DoctorCE.com site - Custom Windows CE development/consulting services.

Return to Chris De Herrera's Windows CE Website


Questions? Comments? Suggestions? Email Terence "Dr. CE" Goggin.