Pocket PC CHM 文件阅读器 (源代码)

news/2025/2/9 1:49:24/
Pocket PC CHM 文件阅读器 (源代码)
 
作者:Peter Tewkesbury   来源:code project  
 

下载>>

Sample Image - pic004.jpg

Introduction

I have started to study for the MCAD. So after getting the books (I cannot afford the training courses), I started to read. However, as life is busy, I either had to carry a number of heavy books around, or sit in front of a PC which is not always possible. I was then lucky enough to get a Pocket PC for Christmas. But Pocket PCs do not come with a CHM Reader, and the ones available on the web are not free, or do not handle large CHM files well. So I decided to write my own and this is the result. A FREE CHM Reader which can handle large CHM files (Tested up to 14Mb in size). This program has only been tested on the Pocket PC 2003 on an IPaq 5550.

The Code

This CHM Reader is a MFC Doc List application, which uses a number of good libraries.

  • Virtual Office Systems Incorporated - VOImage, VOString & VORegistry classes
  • Vassili Philippov - CSTHtmlDialog
  • Jed Wing - The CHMLib Library
  • João Paulo Figueira [joao.figueira@vianw.pt] - General Help

Thanks to all these people for the great code they have contributed to the web.

CHMReader first displays a DocList (MFC's) of all the CHM files in the selected directory of the PocketPC. When the user selects one of them, MFC creates a new CCHMReaderDoc instance which will then use CCHMFile class. This class handles the CHMLib library. The CHM file is then opened, and the CCHMFile class will build a list of all the files contained in the CHM file. It also builds a Tree list of the contents. This is then displayed in the CCHMReaderView class. This shows the contents of the CHM File. The user can then select one of the items in the contents, and a new dialog is displayed. This dialog contains the Pocket PC Internet Explorer control. The HTML file is extracted from the CHM file using the CCHMFile class & the CHMLib library. The HTML is also scanned for any Style Sheet entries. These are then also extracted from the CHM file. Then the IE control is initialized with the HTML for display.

One thing to note is that the images are extracted from the CHM file as the IE control needs them. When the IE control loads the HTML, it will ask for each image in turn by way of a notification message. When I handle the notification, I simply extract the image from the CHM file into a buffer. It is then uncompressed using the VOImage class. It is then passed back to the IE control.

Sample screenshot

Sample screenshot

Extras

I also added a few simple extras like the ability to change the text size, toggle 'Clear Text' & 'Fit to Window' as these are all implemented by the IE control. I also added '<' and '>' buttons to the toolbar to allow the user to navigate back and forth in the contents list easily.

Also note: If one CHM file requires files from other CHM files (Windows CHM Help Files) then if the files are present, CHMReader will try to get the files required, but it does not always.

Installation

Just copy the CHMReader.EXE & any CHM files to your PocketPC, and run.

Build Environment

To build the CHMReader, I used embedded Visual C V4 SP2.

History

  • V1.0 - 9 Feb 2004 - First release
  • V1.01 -11 Feb 2004 - Bug fixes - Incorrectly handling images which where not found in CHM file.
  • V1.03 - 18 Feb 2003 - Bug fixes - Pocket Internet Explorer does not handle script or XML tags, so I removed them from the HTML code before I pass it to the HTML code. Also links to other parts of the CHM file did not work correctly. Now fixed.
    • 24 Feb 2003 - Added download for PocketPC2002 OS

http://www.ppmy.cn/news/140206.html

相关文章

CHM Reader 使用方法

当你安装完成CHM Reader 火狐插件后&#xff0c;是不是也不能双击打开CHM文档&#xff1f;对了&#xff0c;打开方式不对。应该是 1、打开火狐浏览器&#xff1b; 2、在浏览器的上边栏找到“文件”选项&#xff0c;单击打开&#xff1b; 3、有没有看到“OPEN CHM FILE”&…

CHM格式简介

CHM格式简介 CHM格式有一个初始化头&#xff0c;占38个字节&#xff0c;后面是header section和到正文的偏移量。加在一起&#xff0c;这些被称为文件头。 header section一共有两个section&#xff08;有点像信息说明&#xff09;&#xff0c;一个是文件目录&#xff0c;另一个…

linux下chm阅读器的安装与使用

Fedora Core 下的chm阅读器有好几个&#xff0c;xchm、chmsee、kchmviewer、gnochm、chmreader、fbreader。 1、gnochm gnochm功能和界面都跟windows下的chm阅读器基本一样&#xff0c;没有乱码。目前最新的版本是0.9.11 。前几天直接yum源安装的还是0.9.9版本&#xff0c;好像…

几款LINUX下的CHM查看器

本文旨在介绍linux下的常见chm阅读软件及其安装&#xff0c;并针对一些问题给出解决方法。一、CHMSEE 这个比较常见了&#xff0c;呵呵。安装: sudo apt-get install chmsee之后在应用程序附件中就可以看到了。问题1&#xff1a;启动不了或者出现chmsee: error while loading s…

ubuntu下CHM阅读器

本文旨在介绍linux下的常见chm阅读软件及其安装&#xff0c;并针对一些问题给出解决方法。 一、CHMSEE 这个比较常见了&#xff0c;呵呵。 安装: sudo apt-get install chmsee 之后在应用程序附件中就可以看到了。 问题1&#xff1a; 启动不了或者出现 chmsee: error …

为Linux安装CHM阅读器

为Linux安装CHM阅读器 在Linux下&#xff0c;PDF很好解决&#xff0c;软件很多&#xff0c;想兼容性最好当然就去下载Adobe官方的Adobe Reader就好。但是我还需要查PHP或者MySQL的开发手册&#xff0c;为了查阅方便下载的是CHM文件&#xff0c;而Linux系统默认不能直接打开CHM…

chm文档

<?xml version"1.0" encoding"utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns"http://www.w3.org/199…

手机怎么打开html.chm,chm格式文件怎么打开,华为手机chm阅读器哪个好

chm文件格式是新一代的帮助文档格式&#xff0c;能够利用HTML作源文,把帮助内容以类似数据库的形式编译储存。一般情况下win10系统用户会使用系统默认程序来打开chm文件&#xff0c;不过却打不开chm文件格式&#xff0c;有些文件打开了也是空白&#xff0c;显示“已取消到该网页…