Microsoft KB Archive/120251

{|
 * width="100%"|

How to Specify Filenames/Paths in Viewer/WinHelp Commands

 * }

Q120251

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) for Windows
 * Microsoft Win32 Software Development Kit (SDK), versions 3.5, 3.51, 4.0

-

SUMMARY
Both WinHelp and Viewer have commands such as JumpId that take a filename as a parameter. Depending on the circumstances under which such commands are called, the number of backslashes (\) included in the filename as part of the path may have to be doubled for the command to work correctly. For example, if JumpId is called from a HotSpot, you need to use two backslashes to separate the subdirectory names as in this example:

  JumpId("C:\\MYAPP\\HLPFILE\\MYHLP.HLP","topicx") But if JumpId is used as the command associated with a menu item, you need to use four backslashes to separate the subdirectory names within the JumpId command, which is itself part of an InsertItem command. For example:

  InsertItem("MNU_FILE","my_id","Jump",

"JumpId('C:\\\\MYAPP\\\\HLPFILE\\\\MY HLP.HLP','topicx')",0) To avoid having to modify the filename parameter depending on how the function is called, Microsoft recommends that you use a single forward slash (/) to separate subdirectory names within the filename. For example:

  JumpId("C:/MYAPP/HLPFILE/MYHLP.HLP","topicx") A single forward slash will work regardless of how the command is called.

Additional query words: 3.10 3.50 4.00 95

Keywords :

Issue type :

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32SDK400 kbWin32SDK350 kbWin32SDK351 kbWinSDKSearch