wpAddSetPortRedirPage
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method adds the Set Port Redirection page to the Settings notebook.
Syntax
_wpAddSetPortRedirPage(somSelf, hwndNotebook);
Parameters
- somSelf (WPSpool *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPSpool.
- hwndNotebook (HWND) - input
- Window handle for the Settings notebook.
Returns
- rc (ULONG) - returns
- Page identifier.
- A return value of 0 indicates that an 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 Port Redirection 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_wpAddSetPortRedirPage(MyObj somSelf, HWND hwndNotebook) { / MyObjData *somThis = MyObjGetData(somSelf); */ MyObjMethodDebug("MyObj","MyObj_wpAddSetPortRedirPage"); /* return (parent_wpAddSetPortRedirPage(somSelf,hwndNotebook)); */ return ( SETTINGS_PAGE_REMOVED ); }