⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcg23.htm

📁 Visual C++与数据库的连接经典实例
💻 HTM
📖 第 1 页 / 共 5 页
字号:

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE><B>NOTE</B>

<BR>

<BR>One of the advantages of using SHED.EXE is that the Hotspot Editor compresses .BMP files. For example, setup.bmp requires 38,462 bytes of storage, whereas setup.shg occupies only 36,959 bytes and has four jumps defined.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E69E283"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Compiling .RTF Files to Create WinHelp .HLP Files</B></FONT></CENTER></H4>

<BR>

<P>Creating the final WinHelp .HLP file from your .RTF file and any graphics that are referenced in the .RTF file is a three-step process.

<BR>

<OL>

<LI>Create a project file that provides information to the help compiler on the files that constitute your help file and assigns help context ID values to the help context string. If your help file was originally created with Visual C++, this file has already been created for you.

<BR>

<BR>

<LI>Use the Microsoft Help Workshop program (there should be an icon for it in the Visual C++ program folder) and load the help project's .HPJ file. Click the compile button on the toolbar or select File | Compile to compile your help menu. Prior to the compilation process, the dialog box shown in Figure 23.12 is displayed to allow you to select options for the help file.

<BR>

<BR><B><A HREF="23vcg12.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/23vcg12.gif">Figure 23.12. Microsoft Help Workshop's compile options dialog box.</A></B>

<BR>

<BR>

<LI>Test your .HLP file to make sure it conforms to your expectations. If you select the Automatically display Help file option, your help file will be loaded into WinHelp when the compilation is complete.

<BR>

<BR>

</OL>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE><B>NOTE</B>

<BR>

<BR>Even though the HELPEX sample help file that is supplied on the MSDN CD is intended to be compiled with the DOS-based help compilers, using Microsoft Help Workshop will work, with only minor warnings about improper labels. It will create a valid help file.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>The following three sections describe the preceding steps in detail.

<BR>

<BR>

<A NAME="E70E126"></A>

<H5 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Creating a Project File</B></FONT></CENTER></H5>

<BR>

<P>Help project files, which are usually named <I>APPNAME</I>.HPJ, are similar in concept to Visual C++ makefiles or project files. Listing 23.2 shows the contents of the project file for the Help Example help file, HELPEX.HPJ.

<BR>

<P>

<FONT COLOR="#000080"><B>Listing 23.2. Sections and entries in the HELPEX.HPJ help project file (after loading into Microsoft Help Workshop).</B></FONT>

<BR>

<PRE>

<FONT COLOR="#000080">; This file is maintained by HCW. Do not modify this file directly.

[OPTIONS]

HCW=0

; error message:

;

;    R1023: Keyword(s) defined without title in page 59

;           of file helpex.rtf

;

; This message indicates that a topic will be listed in

; the Search Topics Found box as &quot;&gt;&gt;Untitled Topic&lt;&lt;&quot;

COMPRESS=60 Hall Zeck

LCID=0x409 0x0 0x0 ;English (United States)

REPORT=Yes

TITLE=Help Example

HLP=.\helpex.hlp

[FILES]

helpex.rtf  ; main topics

[MAP]

#include &lt;helpids.h&gt;</FONT></PRE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE><B>CAUTION</B>

<BR>

<BR>Once you've loaded an .HPJ file into Microsoft Help Workshop, you shouldn't edit the file by hand. Instead, use Microsoft Help Workshop to make changes to the help project file.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Help project files are text files that are organized into sections and are similar in structure to Windows .INI files. Table 23.1 lists the most commonly used sections of a help project file, states whether the section is required in the file, and briefly describes the section's purpose. Keywords for entries in the [OPTIONS] section also appear.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 23.1. The sections of a help project (.HPJ) file.</B></FONT></CENTER>

<BR>



<CENTER><TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Section of </I><I>.HPJ File</I>

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Section Required?</I>

</FONT>

<TD COLSPAN=3 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Description</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

[OPTIONS]

</FONT>

<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

No (but usually present)

</FONT>

<TD COLSPAN=3 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Defines the options that control the WinHelp compilation process. Some of the more common option entries include the following:

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

ROOT=<I>d:\path</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Defines the path to your help source files.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

CONTENTS=

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sets the context

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>ContextString</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

string for the index topic with the Windows 3.1 Help compiler, HC31.EXE.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

TITLE=

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sets the title for

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>AppName Help</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

the WinHelp file, which appears in the help window's title bar.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

ICON= <I>IconFile.</I>ICO

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sets the icon that is displayed when the help window is minimized.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

COMPRESS=0|FALSE

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Controls file compression. 0, or FALSE, means &quot;do not compress files.&quot; 1, or TRUE, compresses the file. Compressing .HLP files saves disk space at the expense of speed in displaying help windows (due to the time required to decompress the file). HC31.EXE supports varying degrees of compression.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD COLSPAN=2 VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

WARNING=3

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Determines what errors are reported. 0 through 3 control the level of error reporting. 0 = no error reports, 1 = most-severe warnings, 2 = intermediate warning level, and 3 = report all warnings.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -