WpAddPowerPage: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:wpAddPowerPage}} 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== <PRE> #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 identif..." |
(No difference)
|
Revision as of 20:59, 1 September 2025
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
#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);
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.
Related Methods
- wpAddPowerPage
- wpAddPowerViewPage
- wpChangePowerState
- wpQueryAutoRefresh
- wpQueryPowerConfirmation
- wpQueryPowerManagement
- wpQueryRefreshRate
- wpSetAutoRefresh
- wpSetPowerConfirmation
- wpSetPowerManagement
- wpSetRefreshRate
Example Code
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 );
}