Jump to content

wpAddCountryPage

From EDM2


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

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

Syntax

_wpAddCountryPage(somSelf, hwndNotebook)

Parameters

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

Returns

rc (ULONG) - returns
Page identifier.
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 Country 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

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

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

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

    return ( SETTINGS_PAGE_REMOVED );
}

Related Methods