Jump to content

wpAddDesktopLockup3Page

From EDM2
Revision as of 17:19, 28 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpAddDesktopLockup3Page}} This instance method is called to allow the object to add the '''Lockup 3''' page to its Settings notebook. ==Syntax== <pre> _wpAddDesktopLockup3Page(somSelf, hwndNotebook) </pre> ==Parameters== ;''somSelf'' (WPDesktop *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPDesktop. ;''hwndNotebook'' (HWND) - input: Settings notebook handle. ==Returns== ;''rc'' (ULONG) -...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This instance method is called to allow the object to add the Lockup 3 page to its Settings notebook.

Syntax

_wpAddDesktopLockup3Page(somSelf, hwndNotebook)

Parameters

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

Returns

rc (ULONG) - returns
Page identifier.
0 Error occurred
PageId Identifier for the inserted page.

Usage

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

How to Override

This method should always be overridden in order to replace or remove the Lockup 3 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.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

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

rc = _wpAddDesktopLockup3Page(somSelf, hwndNotebook);

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

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

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

    return ( SETTINGS_PAGE_REMOVED );
}

Related Methods