Nesting Quotation Marks Inside Windows Help Macros

Last reviewed: August 11, 1997
Article ID: Q77748

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) version 3.1
  • Microsoft Win32 SDK, versions 3.5, 3.51, and 4.0

In Windows Help macros, strings may be delimited in two ways. The string can be opened and closed by double quotation marks or the string can be opened by a single opening quotation mark and closed by a single closing quotation mark.

Any quoted strings contained in a string delimited with double quotation marks must be enclosed in opening and closing single quotation marks.

The single opening quotation mark is different from the single closing quotation mark. The single opening quotation mark (`) is paired with the tilde (~) above the TAB key on extended keyboards; the single closing quotation mark (') is the same as the apostrophe. For example,

   CreateButton("time_btn", "&Time", "ExecProgram("clock", 0)")

is illegal because the string "clock" uses double quotation marks within the double quotation marks used for the ExecProgram macro. The following example corrects the error by enclosing "clock" in single quotation marks:

   CreateButton("time_btn", "&Time", "ExecProgram(`clock', 0)")

Keywords          : TlsHlp kbtool
Version           : 3.1 3.5 3.51 4.0
Platform          : NT WINDOWS
Issue type        : kbinfo
Solution Type     : Info_Provided


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.