Jump to content

wpMenuItemHelpSelected

From EDM2

This instance method is called to allow the object to display the requested help panel.

Syntax

_wpMenuItemHelpSelected(somSelf, MenuId)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
MenuId (ULONG) - input
Object's menu ID.
For a listing of WPMENUIDs, see the individual object classes.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

The default WPObject class doesn't process this method at all other than to return false.

Usage

This method is generally called only by the system when help on a pop-up menu item is requested.

How to Override

This method should be overridden in order to display an appropriate help panel for a user-defined menu item. This is typically accomplished by issuing a call to the wpDisplayHelp method.

Example Code

This example overrides wpMenuItemHelpSelected and provides help for the Hex and Text view popup menu selections.

SOM_Scope BOOL   SOMLINK Browse_O_Maticwps_wpMenuItemHelpSelected(Browse_O_Matic *somSelf,
                                 ULONG MenuId)
{
    /* Browse_O_MaticData *somThis = Browse_O_MaticGetData(somSelf); */
    Browse_O_MaticMethodDebug("Browse_O_Matic","Browse_O_Maticwps_wpMenuItemHelpSelected");

    switch( MenuId){

      case ID_OPEN_TEXT:
         return( _wpDisplayHelp( somSelf, PANEL_HELP_OPEN_TEXT, "pmbrowse.hlp"));

      case ID_OPEN_HEX:
         return( _wpDisplayHelp( somSelf, PANEL_HELP_OPEN_HEX, "pmbrowse.hlp"));

      default:
         break;
    }

    return( FALSE);
}

Related Methods