Jump to content

WpAddClockView2Page: Difference between revisions

From EDM2
Created page with "==Description== This instance method is called to allow the object to add the View 2 page to its Settings notebook. ==Syntax== <PRE> #define INCL_WINWORKPLACE #include <os2...."
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
[[image:wpAddClockView2Page.png|thumb]]
This instance method is called to allow the object to add the View 2 page to its Settings notebook.  
This instance method is called to allow the object to add the View 2 page to its Settings notebook.  


Line 13: Line 13:
rc = _wpAddClockView2Page(somSelf, hwndNotebook);
rc = _wpAddClockView2Page(somSelf, hwndNotebook);
</PRE>
</PRE>
==Parameters==
==Parameters==
; somSelf (WPClock *) - input : Pointer to the object on which the method is being invoked.
;''somSelf'' (WPClock *) - input : Pointer to the object on which the method is being invoked.
 
:Points to an object of class [[WPClock]].
Points to an object of class WPClock.  
;''hwndNotebook'' ([[HWND]]) - input : Settings notebook handle.
 
; hwndNotebook (HWND) - input : Settings notebook handle.
 


==Return Code==
==Return Code==
rc (ULONG) - returns
;''rc'' ([[ULONG]]) - returns
 
* Page identifier.
* Page identifier.
* Error occurred
* Error occurred
; PageId : Identifier for the inserted page.  
; PageId : Identifier for the inserted page.


==How to Override==
==How to Override==
Line 50: Line 47:


==Related Methods==
==Related Methods==
* [[wpAddSettingsPages]]
*[[wpAddSettingsPages]]
* [[wpInsertSettingsPage]]
*[[wpInsertSettingsPage]]


[[Category:The OS/2 API Project]]
[[Category:SOM Object Method]]
[[Category:Object Methods]]

Latest revision as of 23:16, 19 May 2025

This instance method is called to allow the object to add the View 2 page to its Settings notebook.

Syntax

#define INCL_WINWORKPLACE
#include <os2.h>

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

rc = _wpAddClockView2Page(somSelf, hwndNotebook);

Parameters

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

Return Code

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

How to Override

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

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

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

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

    return ( SETTINGS_PAGE_REMOVED );
}

Related Methods