Delphi Programming for the HTML Help API N Page 1

Total Page:16

File Type:pdf, Size:1020Kb

Delphi Programming for the HTML Help API N Page 1 Delphi Programming for the HTML Help API n Page 1 A Help Think Press Publication Delphi Programming for the HTML Help API by Robert Chandler The Helpware Group http://www.helpware.net Help Think Press A Division of Work Write, Inc. 128 South Eastview Avenue Feasterville, PA 19053 USA Tel: +1 215.357.3453 Web: http://www.workwrite.com/ helpthink/welcome.htm Email: [email protected] Copyright 2001, Help Think Press/Work Write, Inc. All rights reserved. Delphi Programming for the HTML Help API n Page 2 Copyright © 2002, Work Write, Inc. All Rights Reserved. This document is the sole property of Work Write, Inc. and is protected in its entirety by copyright law. You must tread this document as you would any other copyrighted material, such as a book. Limitation of liability No patent liability is assumed with respect to the use of the information contained herein or accompanying sample files. Although every precaution has been taken in the preparation of these materials, the publisher/author assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Cheryl Lockett Zubak/ Work Write, Inc./Help Think Press cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. The publisher welcomes your feedback This document is published by Help Think Press, a division of Work Write, Inc. Work Write, Inc. Work Write, Inc. specializes in the development of hypertext user assistance as well as training on authoring tools and help design. (For more information, see “About the pubisher” at the end of this document.) Help Think Press welcomes (truly! no kidding!) your comments on these materials and, if we find them to be valid, will make every effort to incorporate them into the next edition. You can reach Cheryl Lockett Zubak at Work Write, Inc., 128 South Eastview Avenue, Feasterville, PA 19053 USA. Phone: +1 (215) 357-3453; fax +1 (215) 357-0695; email [email protected]; website http://www.workwrite.com. Copyright 2001, Help Think Press/Work Write, Inc. All rights reserved. Delphi Programming for the HTML Help API n Page 3 Table of contents Title page .................................................................................. 1 Copyright . ................................................................................ 2 Introduction ..............................................................................5 Examples and source code ...........................................................6 Getting started...........................................................................7 Connecting to the API ..................................................................8 Static versus dynamic loading ................................................................. 8 Static loading ....................................................................................... 9 Dynamic loading ..................................................................................10 The HtmlHelp() API function ................................................................... 12 Examples using HtmlHelp() .................................................................... 14 Basic help commands .................................................................15 A warning about closing help ................................................................. 15 Displaying a help topic.......................................................................... 16 Displaying help using help context IDs .................................................... 17 Defining the context ID (topic mapping) .................................................. 17 The Delphi side of context help ............................................................... 18 Moving from WinHelp to HTML Help ..............................................19 Hooking help calls ................................................................................ 19 Programming “What’s This” help ............................................................ 21 HTML Help popups ............................................................................... 24 Other HTML Help Programming Issues .......................................... 28 Isolating the application from the API ..................................................... 28 Delphi 3 COM DLL bug........................................................................... 29 Launching HTML Help from a second application ...................................... 30 Free Delphi code (Woo hoo!) ........................................................31 HH.pas ................................................................................................ 31 HH_Funcs.pas ...................................................................................... 31 Other HH API commands ............................................................ 32 Code Example 4................................................................................... 32 The Contents, Search and Index tabs ...................................................... 32 Get Last HTML Help error ....................................................................... 34 Keyword searches ................................................................................ 35 Synching the Contents tab .................................................................... 36 Getting the window handle ................................................................... 36 Programming HH window types ............................................................. 36 Copyright 2001, Help Think Press/Work Write, Inc. All rights reserved. Delphi Programming for the HTML Help API n Page 4 Bridging the gap between help and the application ..............................................................41 HTML Help notification messages................................................. 42 Enabling notification messages ............................................................. 43 Receiving notification messages ............................................................ 43 HTML Help training cards ........................................................... 45 Setting up training cards ...................................................................... 45 Responding to a WM_TCARD ................................................................. 46 Embedding the WebBrowser control ............................................ 47 Importing the WebBrowser ActiveX control .............................................. 48 Programming the WebBrowser control .................................................... 49 Embedding HTML Help...............................................................50 How it’s done ...................................................................................... 50 Extending HTML Help using COM ................................................. 53 Calling the automation server................................................................ 53 Creating the automation server ............................................................. 54 Register a COM control as safe ............................................................... 56 Extending HTML Help using KeyHelp ............................................ 57 Reading the contents of a CHM file .............................................. 57 A few final remarks ................................................................... 58 About the author, Roboert Chandler ....................................................... 58 About the publisher, Help Think Press ..................................................... 58 Appendix 1 .............................................................................. 59 Copyright 2001, Help Think Press/Work Write, Inc. All rights reserved. Delphi Programming for the HTML Help API n Page 5 A Help Think Press Publication Delphi Programming for the HTML Help API by Robert Chandler The Helpware Group http://www.helpware.net his chapter covers HTML Help programming using Borland’s 32-bit Delphi T(i.e., Delphi 2 and above). While Delphi does not support HTML Help directly, Delphi is a very rich and flexible programming environment. We will see that it takes very little effort to convert our WinHelp Delphi appli- cations to HTML Help. The chapter assumes that you have a basic working knowledge of Delphi programming and have glanced at the HTML Help API reference in the Microsoft HTML Help Workshop online help. In this chapter, we will cover such subjects as: u Connecting to the API u Basic help commands This document and accompanying sample files were developed under contract to: u Moving from WinHelp to HTML Help Help Think Press A Division of Work Write, Inc. u Understanding HTML Help programming issues and API commands http://www.workwrite.com/ helpthink/welcome.htm u Reviewing the free Delphi code Copyright © 2002, Help Think Press/Work Write, Inc. All rights reserved. u Connecting HTML Help systems with your Delphi program Copyright 2001, Help Think Press/Work Write, Inc. All rights reserved. Delphi Programming for the HTML Help API n Page 6 Examples and source code If you haven’t yet installed the HTML Help Workshop, you should do so, since it includes detailed documentation on programming the HTML Help API. You can download it from: http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconHH1Start.asp
Recommended publications
  • Context-Sensitive Help
    Module 15: Context-Sensitive Help Program examples compiled using Visual C++ 6.0 (MFC 6.0) compiler on Windows XP Pro machine with Service Pack 2. Topics and sub topics for this Tutorial are listed below: Context-Sensitive Help The Windows WinHelp Program Rich Text Format Writing a Simple Help File An Improved Table of Contents The Application Framework and WinHelp Calling WinHelp Using Search Strings Calling WinHelp from the Application's Menu Help Context Aliases Determining the Help Context F1 Help Shift-F1 Help Message Box Help: The AfxMessageBox() Function Generic Help A Help Example: No Programming Required The MAKEHELP Process Help Command Processing F1 Processing Shift-F1 Processing A Help Command Processing Example: MYMFC22B Header Requirements CStringView Class CHexView Class Resource Requirements Help File Requirements Testing the MYMFC22B Application Context-Sensitive Help Help technology is in a transition phase at the moment. The Hypertext Markup Language (HTML) format seems to be replacing rich text format (RTF). You can see this in the new Visual C++ online documentation via the MSDN viewer, which uses a new HTML-based help system called HTML Help. Microsoft is developing tools for compiling and indexing HTML files that are not shipped with Visual C++ 6.0. In the meantime, Microsoft Foundation Class (MFC) Library version 6.0 application framework programs are set up to use the WinHelp help engine included with Microsoft Windows. That means you'll be writing RTF files and your programs will be using compiled HLP files. This module first shows you how to construct and process a simple stand-alone help file that has a table of contents and lets the user jump between topics.
    [Show full text]
  • Powerview Command Reference
    PowerView Command Reference TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents ...................................................................................................................... PowerView User Interface ............................................................................................................ PowerView Command Reference .............................................................................................1 History ...................................................................................................................................... 12 ABORT ...................................................................................................................................... 13 ABORT Abort driver program 13 AREA ........................................................................................................................................ 14 AREA Message windows 14 AREA.CLEAR Clear area 15 AREA.CLOSE Close output file 15 AREA.Create Create or modify message area 16 AREA.Delete Delete message area 17 AREA.List Display a detailed list off all message areas 18 AREA.OPEN Open output file 20 AREA.PIPE Redirect area to stdout 21 AREA.RESet Reset areas 21 AREA.SAVE Save AREA window contents to file 21 AREA.Select Select area 22 AREA.STDERR Redirect area to stderr 23 AREA.STDOUT Redirect area to stdout 23 AREA.view Display message area in AREA window 24 AutoSTOre ..............................................................................................................................
    [Show full text]
  • Upgrading to Micro Focus Enterprise Developer 2.3 for Visual Studio Micro Focus the Lawn 22-30 Old Bath Road Newbury, Berkshire RG14 1QN UK
    Upgrading to Micro Focus Enterprise Developer 2.3 for Visual Studio Micro Focus The Lawn 22-30 Old Bath Road Newbury, Berkshire RG14 1QN UK http://www.microfocus.com Copyright © Micro Focus 2011-2015. All rights reserved. MICRO FOCUS, the Micro Focus logo and Enterprise Developer are trademarks or registered trademarks of Micro Focus IP Development Limited or its subsidiaries or affiliated companies in the United States, United Kingdom and other countries. All other marks are the property of their respective owners. 2015-09-16 ii Contents Upgrading to Enterprise Developer for Visual Studio .................................... 4 Licensing Changes ..............................................................................................................4 Resolving conflicts between reserved keywords and data item names .............................. 4 Importing Existing COBOL Code into Enterprise Developer ...............................................5 Recompile all source code .................................................................................................. 6 Upgrading from Net Express to Enterprise Developer for Visual Studio ............................. 6 An introduction to the process of upgrading your COBOL applications ................... 6 Compile at the Command Line Using Existing Build Scripts ....................................7 Debugging Without a Project ....................................................................................9 Create a project and import source ........................................................................10
    [Show full text]
  • Windows 95 & NT
    Windows 95 & NT Configuration Help By Marc Goetschalckx Version 1.48, September 19, 1999 Copyright 1995-1999 Marc Goetschalckx. All rights reserved Version 1.48, September 19, 1999 Marc Goetschalckx 4031 Bradbury Drive Marietta, GA 30062-6165 tel. (770) 565-3370 fax. (770) 578-6148 Contents Chapter 1. System Files 1 MSDOS.SYS..............................................................................................................................1 WIN.COM..................................................................................................................................2 Chapter 2. Windows Installation 5 Setup (Windows 95 only)...........................................................................................................5 Internet Services Manager (Windows NT Only)........................................................................6 Dial-Up Networking and Scripting Tool....................................................................................6 Direct Cable Connection ..........................................................................................................16 Fax............................................................................................................................................17 Using Device Drivers of Previous Versions.............................................................................18 Identifying Windows Versions.................................................................................................18 User Manager (NT Only) .........................................................................................................19
    [Show full text]
  • Acronis Revive 2019
    Acronis Revive 2019 Table of contents 1 Introduction to Acronis Revive 2019 .................................................................................3 1.1 Acronis Revive 2019 Features .................................................................................................... 3 1.2 System Requirements and Installation Notes ........................................................................... 4 1.3 Technical Support ...................................................................................................................... 5 2 Data Recovery Using Acronis Revive 2019 .........................................................................6 2.1 Recover Lost Files from Existing Logical Disks ........................................................................... 7 2.1.1 Searching for a File ........................................................................................................................................ 16 2.1.2 Finding Previous File Versions ...................................................................................................................... 18 2.1.3 File Masks....................................................................................................................................................... 19 2.1.4 Regular Expressions ...................................................................................................................................... 20 2.1.5 Previewing Files ............................................................................................................................................
    [Show full text]
  • Defending Windows with Antivirus Software
    Defending Windows with Antivirus Software, December 7, 2017 With all the dangers lurking on the Internet, keeping your computer safe and clean is an important challenge. In this 90-minute session we will discuss strategies and technologies for keeping your computer safe in a networked world, with the emphasis on antivirus software. Malware The term malware is a contraction of malicious software. Put simply, malware is any piece of software that was written with the intent of doing harm to your data or device. https://www.avg.com/en/signal/what-is-malware Brief history https://en.wikipedia.org/wiki/Antivirus_software The roots of the computer virus date back as early as 1949, when the Hungarian scientist John von Neumann published the "Theory of self- reproducing automata." First computer virus ("Creeper") appeared in 1971 Term first coined in 1983. Before the Internet, computer viruses were typically spread by infected floppy disks. The late 80's and early 90's saw the birth of antivirus industry Common Malware Types https://www.veracode.com/blog/2012/10/common-malware-types-cybersecurity-101 Viruses, Worms, Trojan horses, Ransomware, Spyware, Adware, Rootkits, etc... Malware symptoms While the different types of malware differ greatly in how they spread and infect computers, they all can produce similar symptoms. Computers that are infected with malware can exhibit any of the following symptoms: Increased CPU usage Slow computer or web browser speeds Problems connecting to networks Freezing or crashing Modified or deleted files Appearance
    [Show full text]
  • Windows® Scripting Secrets®
    4684-8 FM.f.qc 3/3/00 1:06 PM Page i ® WindowsSecrets® Scripting 4684-8 FM.f.qc 3/3/00 1:06 PM Page ii 4684-8 FM.f.qc 3/3/00 1:06 PM Page iii ® WindowsSecrets® Scripting Tobias Weltner Windows® Scripting Secrets® IDG Books Worldwide, Inc. An International Data Group Company Foster City, CA ♦ Chicago, IL ♦ Indianapolis, IN ♦ New York, NY 4684-8 FM.f.qc 3/3/00 1:06 PM Page iv Published by department at 800-762-2974. For reseller information, IDG Books Worldwide, Inc. including discounts and premium sales, please call our An International Data Group Company Reseller Customer Service department at 800-434-3422. 919 E. Hillsdale Blvd., Suite 400 For information on where to purchase IDG Books Foster City, CA 94404 Worldwide’s books outside the U.S., please contact our www.idgbooks.com (IDG Books Worldwide Web site) International Sales department at 317-596-5530 or fax Copyright © 2000 IDG Books Worldwide, Inc. All rights 317-572-4002. reserved. No part of this book, including interior design, For consumer information on foreign language cover design, and icons, may be reproduced or transmitted translations, please contact our Customer Service in any form, by any means (electronic, photocopying, department at 800-434-3422, fax 317-572-4002, or e-mail recording, or otherwise) without the prior written [email protected]. permission of the publisher. For information on licensing foreign or domestic rights, ISBN: 0-7645-4684-8 please phone +1-650-653-7098. Printed in the United States of America For sales inquiries and special prices for bulk quantities, 10 9 8 7 6 5 4 3 2 1 please contact our Order Services department at 1B/RT/QU/QQ/FC 800-434-3422 or write to the address above.
    [Show full text]
  • Help for HTML Help
    Microsoft HTML Help Overview Microsoft® HTML Help consists of an online Help Viewer, related help components, and help authoring tools from Microsoft Corporation. The Help Viewer uses the underlying components of Microsoft Internet Explorer to display help content. It supports HTML, ActiveX®, Java™, scripting languages (JScript®, and Microsoft Visual Basic® Scripting Edition), and HTML image formats (.jpeg, .gif, and .png files). The help authoring tool, HTML Help Workshop, provides an easy-to-use system for creating and managing help projects and their related files. Features About creating help Satellite .dll files enable help in all supported languages. Now help will Newa flewatuaryess i nm thias trcelhea stehe language of the installed operating system. Microsoft® HTML Help version 1.3 contains these new features: There is now a single version of Hhupd.exe that works in all supported languages. NOTE: These enhancements are designed to make HTML Help fully compliant with the language features of Microsoft Windows® 2000. For more information on multiple language support in Windows 2000, see the Multilanguage Support white paper on the Microsoft Windows 2000 Web site. Introducing HTML Help help system or Web site. The HTML Help components HTML Help contains the following components: HTML Help ActiveX control: a small, modular program used to insert help navigation and secondary window functionality into an HTML file. The HTML Help Viewer: a fully-functional and customizable three- paned window in which online help topics can appear. Microsoft HTML Help Image Editor: an online graphics tool for creating screen shots; and for converting, editing, and viewing image files. The HTML Help Java Applet: a small, Java-based program that can be used instead of an ActiveX control to insert help navigation into an HTML file.
    [Show full text]
  • Arcinfo Workstation 9.3 System Requirements
    ArcInfo Workstation 9.3 System Requirements Table of Contents Supported Operating Systems Hardware Requirements Software Requirements Supported Relational Database Management Systems Related ESRI Materials Supported Operating Systems Minimum Maximum Supported Operating System Limitations Version Version HP-UX PA-RISC HP-UX 11.i PA-RISC Requirements IBM AIX 5.3 TL7 IBM AIX Requirements Maintenance Sun Solaris 9 (SPARC) Sun Solaris Requirements Update 3 Maintenance Sun Solaris 10 (SPARC) Update 4 (8/07) or Sun Solaris Requirements higher Windows 2003 (32-bit) Server SP1 SP2 Standard, Enterprise, Datacenter Windows 2003 (64-bit (EM64T)) Server Standard, Enterprise, SP1 SP2 64-bit processors support Datacenter Support for Windows Windows 2003 Server Terminal SP1 SP2 Terminal Server (WTS) Services and Citrix MetaFrame Windows 2008 (32-bit) Server SP2 Standard, Enterprise, Datacenter Windows 2008 (64-bit (EM64T)) Server Standard, Enterprise, SP2 64-bit processors support Datacenter Windows 2008 R2 (64-bit (EM64T)) Server Standard, Enterprise, 64-bit processors support Datacenter Windows 7 (32-bit) Ultimate, Enterprise, Business, Home Windows 7 limitation Premium Windows 7 (64-bit (EM64T)) Ultimate, Enterprise, Business, Windows 7 limitation Home Premium Windows Vista (32-bit) Ultimate, Enterprise, Business, Home SP2 SP2 Premium Windows Vista (64-bit (EM64T)) Ultimate, Enterprise, Business, SP2 SP2 64-bit processors support Home Premium Windows XP (32-bit) Professional Windows XP SP2, SP3 SP3 SP3 Edition, Home Edition Limitations Windows XP SP2
    [Show full text]
  • Secure Desktop 11 Manual
    Secure Desktop 11 Product Manual VISUAL AUTOMATION Page 1 Secure Desktop 11 Product Manual VISUAL AUTOMATION Product Manual Secure Desktop Version 11 Visual Automation, Inc. PO Box 502 Grand Ledge, Michigan 48837 USA [email protected] [email protected] http://visualautomation.com The information contained in this document is subject to change without notice. Visual Automation makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Visual Automation shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishings, performance, or use of this material. This document contains proprietary information which is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated to another program language without the prior written consent of Visual Automation, Inc. Microsoft® and Windows® are registered trademarks of Microsoft Corporation. © Visual Automation, Inc. 1994-2021 All Rights Reserved. Last Updated June, 2021 Page 2 Secure Desktop 11 Product Manual TABLE OF CONTENTS Secure Desktop version 6.85 versus 11 6 Secure Desktop 11 versus 10 7 Secure Desktop - An Introduction 8 Secure Desktop Tools | Secure Desktop tab 10 Secure Desktop Tools | Windows Shell tab 12 Secure Desktop Shell 15 The 10 Minute Setup 17 Secure Desktop Tools | Secure Desktop tab | Icon button 21 Secure Desktop Tools | Secure
    [Show full text]
  • R-Linux User's Manual
    User's Manual R-Linux © R-Tools Technology Inc 2019. All rights reserved. www.r-tt.com © R-tools Technology Inc 2019. All rights reserved. No part of this User's Manual may be copied, altered, or transferred to, any other media without written, explicit consent from R-tools Technology Inc.. All brand or product names appearing herein are trademarks or registered trademarks of their respective holders. R-tools Technology Inc. has developed this User's Manual to the best of its knowledge, but does not guarantee that the program will fulfill all the desires of the user. No warranty is made in regard to specifications or features. R-tools Technology Inc. retains the right to make alterations to the content of this Manual without the obligation to inform third parties. Contents I Table of Contents I Introduction to R-Linux 1 1 R-Studi.o.. .F..e..a..t.u..r.e..s.. ................................................................................................................. 2 2 R-Linux.. .S..y..s.t.e..m... .R...e..q..u..i.r.e..m...e..n..t.s. .............................................................................................. 4 3 Contac.t. .I.n..f.o..r.m...a..t.i.o..n.. .a..n..d.. .T..e..c..h..n..i.c.a..l. .S...u..p..p..o..r.t. ......................................................................... 4 4 R-Linux.. .M...a..i.n.. .P..a..n..e..l. .............................................................................................................. 5 5 R-Linu..x.. .S..e..t.t.i.n..g..s. .................................................................................................................. 10 II Data Recovery Using R-Linux 16 1 Basic .F..i.l.e.. .R..e..c..o..v..e..r.y.. ............................................................................................................ 17 Searching for.
    [Show full text]
  • Cd-Rom Baseball Ver 4
    CD-ROM FOOTBALL 2013 RELEASE NOTES IMPORTANT NOTES You should have received the following with your order: Physical Delivery: One CD-ROM. (IMPORTANT: Note that in lieu of Product Registration Code Cards your Product Registration Codes may be printed on your invoice instead). You may also access your Product Registration Codes by logging into your account page at www.strat-o-matic.com Download Purchase: The Setup.EXE file includes all files necessary to install. Product Registration Codes for your game and any options that you purchased should be delivered via email. You may also access your Product Registration Codes and download links by logging into your account page at www.strat-o-matic.com. Please see the information on Authorization System before installing the game to your hard drive. If you are new to the game please see the Quick Start Guide PDF that is accessible from Start/Programs/Strat-O-Matic Football after installing the game. Do NOT dispose of any Product Registration Codes because they may be needed in the future to unlock an associated season or feature. For example, The 2012 Season Roster Product Registration Code will be needed to unlock the 2012 rosters when using them with next year’s version of the game. TO INSTALL THE GAME... If you have a CD-ROM: Place the Strat-O-Matic Football CD-ROM in your CD drive. The installation program should run automatically. If it does not then follow these directions: Click on the Start button and then choose Run. Type D:\SETUP, then click OK.
    [Show full text]