wpAddPowerPage
Appearance
This method is specific to version 2.1, or higher, of the OS/2 operating system.
This instance method adds the Standard Power page to the Settings notebook of the power object.
Syntax
_wpAddPowerPage(somSelf, hwndNotebook)
Parameters
- somSelf (WPPower *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPPower.
- hwndNotebook (HWND) - input
- Settings notebook handle.
Returns
- rc (ULONG) - returns
- Page identifier.
- 0: Error occurred
- PageId: Identifier for the inserted page.
Example Code
Declaration:
#define INCL_WINWORKPLACE #include <os2.h> WPPower *somSelf; /* Pointer to the object on which the method is being invoked. */ HWND hwndNotebook; /* Settings notebook handle. */ ULONG rc; /* Page identifier. */ rc = _wpAddPowerPage(somSelf, hwndNotebook);
This example overrides this method to eliminate this page from the object's settings.
SOM_Scope ULONG SOMLINK MyObj_wpAddPowerPage(MyObj *somSelf, HWND hwndNotebook) { /* MyObjData *somThis = MyObjGetData(somSelf); */ MyObjMethodDebug("MyObj","MyObj_wpAddPowerPage"); /* return (parent_wpAddPowerPage(somSelf,hwndNotebook)); */ return ( SETTINGS_PAGE_REMOVED ); }