Jump to content

wpAddBecomePage

From EDM2
Revision as of 04:43, 11 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpAddBecomePage}} This method is specific to version 4, or higher, of the OS/2 operating system. This instance method adds the standard type page to the Settings notebook. ==Syntax== _wpAddBecomePage(somSelf, hwndNotebook) ==Parameters== ;somSelf (WPDataFile *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPDataFile. ;hwndNotebook (HWND) - input :Settings notebook handle. ==Returns== ;rc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

This instance method adds the standard type page to the Settings notebook.

Syntax

_wpAddBecomePage(somSelf, hwndNotebook)

Parameters

somSelf (WPDataFile *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPDataFile.
hwndNotebook (HWND) - input
Settings notebook handle.

Returns

rc (ULONG) - returns
Page indicator.
0 indicates an error occurred.
PageId indicates the identifier for the inserted page.

How to Override

This method should always be overridden in order to replace or remove the Become page from the object's Settings notebook. To remove the page from the Settings notebook, the override method should return SETTINGS_PAGE_REMOVED without calling the parent method. To replace the page with another page, the override method should call the wpInsertSettingsPage method without calling the parent method.

Usage

This method must be called only from within an override of the wpAddSettingsPages method.

Example Code

Definition.

#define INCL_WINWORKPLACE
#include <os2.h>

WPDataFile     *somSelf;       /*  Pointer to the object on which the method is being invoked. */
HWND            hwndNotebook;  /*  Settings notebook handle. */
ULONG           rc;            /*  Page indicator. */

rc = _wpAddBecomePage(somSelf, hwndNotebook);

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

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

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

    return ( SETTINGS_PAGE_REMOVED );
}

Related Methods