PTC MKS Toolkit Knowledge Base

Section:IO
Product:MKS Toolkit (TKPDev/TKEDev)
Version:
OS:All
Keywords:windows help
Category:Porting/Technical


Is it possible to have native Windows help inside my ported application?


Yes, Windows provides a one call interface, WinHelp(), which can be used from within your MKS Toolkit ported application. You must first use the Microsoft help compiler to define and compile your help text into a .HLP file. WinHelp() can then launch the external viewer from within your application.

Notes:

  • Pass NULL as the first parameter

  • Do not include

  • do link with user32.lib

Example:

    #include
    ...
    /*
    * Display the contents section of the help file.
    */
    WinHelp( NULL, "myhelp.hlp", HELP_CONTENTS, 0 );
    /*
    * Display a specific item from your help file.
    */
    WinHelp( NULL, "myhelp.hlp", HELP_KEY, "TopicA" );
    /*
    * Close the external help viewer.
    */
    WinHelp( NULL, "myhelp.hlp", HELP_QUIT, 0 );