The Microsoft® Foundation Class Library classes cannot be used to construct property pages for a property sheet handler. However, IBM® provides CExtPropertyPage, which may be used in place of the MFC class CPropertyPage.
Property pages implemented by iSeries™ Navigator plug-ins should subclass CExtPropertyPage. The class declaration may be found in the header file PROPEXT.H, and the implementation is contained in the file PROPEXT.CPP. Both files are provided as part of the sample plug-in.
If a plug-in requires that a property sheet is associated with one of its own object types, the SFGAO_HASPROPSHEET flag must be returned as part of the attributes of the object. When this flag is on, the Navigator automatically will add Properties to the context menu for the object. Also, when this flag is on, Navigator will call any registered property sheet handlers to add pages to the property sheet when the context menu item is selected.
In certain cases a plug-in may desire to implement a Properties context menu item that is defined for one of its own object types as a standard Windows® dialog instead of a property sheet. A flag is defined for this situation that may be returned to the Navigator on calls to IContextMenu::QueryContextMenu. If the flag is returned, no automatic processing for Properties is performed, and it is up to the plug-in to add the context menu item and implement the associated dialog. This flag is documented in Description of QueryContextMenu flags.
If a plug-in intends to add property pages to one of the property sheets for an iSeries user, the key that specifies the CLSID of the property sheet handler must specify a PropSheet field that identifies the property sheet to which the specified handler will add pages. An example follows.
;-------------------------------------------------------------------- ; Register a property sheet handler for the Network property sheet for iSeries users [HKEY_CLASSES_ROOT\IBM.AS400.Network\3RD PARTY plug-inS\IBM.Sample\shellex\Users and Groups\User\PropertySheetHandlers\{3D7907A1-9080-11d0-82BD-08005AA74F5C}] "PropSheet"="Networks"
Valid values for the PropSheet field are:
PropSheet field valid values | ||||
---|---|---|---|---|
Groups | Personal | Security or Capabilities | Jobs | Networks |
Groups-Before-All Groups-After-Info |
Personal-Before-All Personal-After-Name Personal-After-Location Personal-After-Mail |
Capabilities-Before-All Capabilities-After-Privileges Capabilities-After-Auditing Capabilities-Before-Other Capabilities-After-Other |
Jobs-Before-All Jobs-After-General Jobs-After-Startup Jobs-After-Display Jobs-After-Output Jobs-After-International |
Networks-Before-All Networks-After-Servers Networks-After-General |
To add pages to a property sheet for an iSeries user, the plug-in must implement the IA4PropSheetNotify interface (see IA4PropSheetNotify interface specifications listing).
Multiple property sheet handlers for the various property sheets that are associated with an iSeries user cannot be implemented on the same implementation class. Each property sheet requires a separate CLSID.