Jump to content

wpAddPowerViewPage

From EDM2
Revision as of 22:02, 1 September 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpAddPowerViewPage}} 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 :S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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