wpclsQueryTitle
Appearance
This method is called to allow the class object to specify the default title for its instances.
Syntax
_wpclsQueryTitle(somSelf)
Parameters
- somSelf (M_WPObject *) - input
- Pointer to the WPObject class object.
Returns
- pTitle (PSZ) - returns
- Pointer to the default title for objects of this class.
Remarks
The title is used as the default for new instances of this class. Additionally, the title is used to describe the class in facilities such as Find, Include, Details, and Sort. The title can be loaded in wpclsInitData and freed in wpclsUnInitData.
Usage
This method can be called at any time in order to determine the default title for instances of this class.
How to Override
All classes should override this method so that new objects and their classes always have a sensible default title.
Example Code
Declaration:
#define INCL_WINWORKPLACE #include <os2.h> M_WPObject *somSelf; /* Pointer to the WPObject class object. */ PSZ pTitle; /* Pointer to the default title for objects of this class. */ pTitle = _wpclsQueryTitle(somSelf);
This example overrides the method to provide a custom title.
SOM_Scope PSZ SOMLINK SampleM_wpclsQueryTitle(M_Sample *somSelf) { /* M_SampleData *somThis = M_SampleGetData(somSelf); */ M_SampleMethodDebug("M_Sample","SampleM_wpclsQueryTitle"); return("My WPS Object"); /* Return a new title */ }