Jump to content

wpAddPowerViewPage

From EDM2

This method is specific to version 2.1, or higher, of the OS/2 operating system.

This instance method adds the Standard Power View page to the Settings notebook of the power object.

Syntax

_wpAddPowerViewPage(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 = _wpAddPowerViewPage(somSelf, hwndNotebook);

This example overrides the method to eliminate this page from the object's Settings notebook.

SOM_Scope ULONG    SOMLINK MyObj_wpAddPowerViewPage(MyObj *somSelf,
                         HWND hwndNotebook)
{
    /* MyObjData *somThis = MyObjGetData(somSelf); */
    MyObjMethodDebug("MyObj","MyObj_wpAddPowerViewPage");

/* return (parent_wpAddPowerViewPage(somSelf,hwndNotebook)); */

    return ( SETTINGS_PAGE_REMOVED );
}

Related Methods