wpAddDeviceIO1Page
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method is called to allow an object to add the I/O Ports page to the settings notebook.
Syntax
_wpAddDeviceIO1Page(somSelf, hwndNotebook)
Parameters
- somSelf (WPDevice *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPDevice.
- 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 to replace or remove the I/O Ports page from the object's Settings notebook. To remove the page from the settings notebook, the override method must return SETTINGS_PAGE_REMOVED without calling the parent method. To replace the page with another page, the override method must call the wpInsertSettingsPage method without calling the parent method.
Example Code
#define INCL_WORKPLACE #include <os2.h> WPDevice *somSelf; /* Pointer to the object on which the method is being invoked. */ HWND hwndNotebook; /* Settings notebook handle. */ ULONG rc; /* Page identifier. */ rc = _wpAddDeviceIO1Page(somSelf, hwndNotebook);
This example overrides the method to eliminate this page from the object's Settings notebook.
SOM_Scope ULONG SOMLINK MyObj_wpAddDeviceIO1Page(MyObj *somSelf, HWND hwndNotebook) { /* MyObjData *somThis = MyObjGetData(somSelf); */ MyObjMethodDebug("MyObj","MyObj_wpAddDeviceIO1Page"); /* return(parent_wpAddDeviceIO1Page(somSelf,hwndNotebook)); */ return(SETTINGS_PAGE_REMOVED); }