180 likes | 314 Views
Windows Software Development Lecture 10. MIS288 Instructor – Larry Langellier. Where Are We?. Last Lecture Understanding the Windows Application Programming Interface Programming the Windows Registry Dynamic Link Libraries Tonight – HTML Help HTML Help Workshop
E N D
Windows Software DevelopmentLecture 10 MIS288 Instructor – Larry Langellier
Where Are We? • Last Lecture • Understanding the Windows Application Programming Interface • Programming the Windows Registry • Dynamic Link Libraries • Tonight – HTML Help • HTML Help Workshop • Creating and compiling an HTML Help System • Connecting the help system to an application • Developing context-sensitive help
HTML Help • Overview • HTML Help replaces older Win32Help • All pages are HTML documents • Supports all HTML features • Projects created using HTML Help Workshop
HTML Help Workshop • Be sure to get the most current version • Version 1.1 (shipped with VB6) is buggy • http://msdn.microsoft.com/library/en-us/htmlhelp/html/htmlhelp.exe • Components • HTML Help Workshop • Stand-alone program used to create Help System • HTML Help ActiveX control • Adds navigation features and supports pop-up topics • HTML Help Image Editor • Allows you to create screen shots and edit them for use in your help system • hh.exe • Runs the compiled Help application
Help System Structure • Topic Files (.htm) • Content of the Help System • Table of contents (.hhc) • Searchable index (.hhk) • Help project (.hhp) • Map files and other include files
Creating a Help file (Steps) • Set Project options • Project tab active, click Change project options • Add topic files • Already developed with an HTML editor • Define the Table of Contents • Define the Index • Define Maps • Compile the Help System
General Project Options Title appears in title bar Topic appears as default
Project File Options Name of compiled help file File containing TOC File used as Index
Table of Contents Insert Heading Insert Topic Delete Topic Move Up / Down Indent / Outdent
Inserting a TOC Heading Appears in TOC Bind URL to TOC entry
Defining the Index Insert Keyword Edit Keyword Delete keyword Move Up / Down Indent / Outdent Sort
Adding Links • Create HREF tags in a document • Use the HTML Help ActiveX control to create buttons displaying related topics • Open an HTML file • Activate the HTML Help ActiveX control – via the button • Specify the Command – Close Window • Select the Display Type – as a button… <P><A HREF=”Origin.htm">Originate a Loan</A></P> <P><A HREF=”Credit.htm">Generate Credit Report</A></P>
Creating Context Sensitive Help • Context Sensitive Help gives the user specific information depending on which form or control they are currently interacting with • Create a Map file using a text editor • Same syntax as a C Header file #define IDH_WELCOME 99 #define IDH_ORIGINATE 100 #define IDH_CREDIT 200 #define IDH_PRINT 300
Connect the Map file • Associate the Map file with the help application • Project tab active • Click HtmlHelp API information button Click to add header (map) file
Establish HTML Page Aliases • Alias the constants to the HTML pages • Example • IDH_CREDIT = Credit.htm • IDH_ORIGINATE = Origin.htm • Etc. Specify constant from Map file Specify HTML topic file
Connecting the Help System to VB • First, compile the HTML Help System • Within HTML Help Workshop • File -> Compile • Specify the File • Click Compile • Set the HelpFile property pertaining to the App object – in Form_Load would be good • Example App.Helpfile = App.Path & "\Ch15.chm" • For each form or control, set the HelpContextID property • The numbers from the map
A Final Word • Third Party tools exist that are much easier to use • Just an interface to build source files and pass them to the HTML help compiler • RoboHelp
What Next? • Next Week • Read Chapter 17 – Program Deployment and Maintenance • Compiling Visual Basic applications • The Package and Deployment Wizard • Homework #8 is due at the beginning of class