| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) | 
Display help information identified by a topic path
#include <photon/PxHelp.h> int PxHelpTopic( char *topic );
PxHelpTopic() tells the Helpviewer to display the help text located by the given topic path.
PxHelpTopic() spawns the Helpviewer if it isn't running, or sends a message to the Helpviewer if it is. Using this function, a Photon application can respond to a help request from the user by telling the Helpviewer to display the relevant help information.
If the topic path is relative (i.e. it doesn't start with a /), it's appended to the root topic path specified in an earlier call to PxHelpTopicRoot().
0 on success, or -1 if the Helpviewer couldn't be found or spawned.
|  | PxHelpTopic() returns immediately, before the help topic has been displayed. | 
The following example shows a fragment from a hypothetical application built using PhAB. This application first sets up a topic root for all help requests; it then displays help for a particular part of the application in response to a callback (which could be attached to a hotkey, for example).
#include <Pt.h>
#include <photon/PxHelp.h>
void main( void )
{
    ...
    PxHelpTopicRoot(
       "/Photon microGUI/Installation & Configuration/pdm" );
    ...
}
int HelpCallback( PtWidget_t * widget, ApInfo_t * apinfo, 
                  PtCallbackInfo_t * cbinfo )
{
    ...
    if( widget == ABW_PDMConsole )
        PxHelpTopic( "Console Switching" );
    ...
    return( Pt_CONTINUE );
}
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
PxHelpQuit(), PxHelpSearch(), PxHelpTopicRoot(), PxHelpTopicTree(), PxHelpUrl(), PxHelpUrlRoot()
Context-Sensitive Help chapter of the Photon Programmer's Guide
| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) |