Pocket PC CHM 文件阅读器 (源代码) |
作者:Peter Tewkesbury 来源:code project |
下载>> IntroductionI 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 CodeThis CHM Reader is a MFC Doc List application, which uses a number of good libraries.
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 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 ExtrasI 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. InstallationJust copy the CHMReader.EXE & any CHM files to your PocketPC, and run. Build EnvironmentTo build the CHMReader, I used embedded Visual C V4 SP2. History
|