Classes can define keynames and values that affect the behavior of their objects. Use keynames with setup methods as follows:
Because keynames have default values, setup strings are not required for these calls.
Every class may define its own set of keynames and values. The Workplace Shell Reference contains the definition of keynames for all classes. Keynames and the values supported by the WPObject class are listed in the following table:
┌──────────────────┬────────────┬──────────────────────────────┐│Keyname │Value │Description │ ├──────────────────┼────────────┼──────────────────────────────┤ │CCVIEW │DEFAULT │Uses the default value of the │ │ │ │concurrent view setting of the│ │ │ │system, when the user selects │ │ │ │open. This is the default │ │ │ │value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │YES │Creates new views of the │ │ │ │object every time the user │ │ │ │selects open. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Resurfaces open views of │ │ │ │object, when the user selects │ │ │ │open. │ ├──────────────────┼────────────┼──────────────────────────────┤ │DEFAULTVIEW │DEFAULT │Sets the default open view to │ │ │ │the object's class default │ │ │ │view as returned by │ │ │ │wpclsQueryDefaultView. This is│ │ │ │the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │SETTINGS │Sets the default open view to │ │ │ │the Settings view. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │ID │Sets the default open view to │ │ │ │the "id" of a user-added view │ │ │ │(0 - 9). │ ├──────────────────┼────────────┼──────────────────────────────┤ │HELPLIBRARY │filename │Sets the help library. │ ├──────────────────┼────────────┼──────────────────────────────┤ │HELPPANEL │id │Sets the object's default help│ │ │ │panel. This is equivalent to │ │ │ │calling wpSetDefaultHelp. │ ├──────────────────┼────────────┼──────────────────────────────┤ │HIDEBUTTON │YES │Views of this object have a │ │ │ │hide button as opposed to a │ │ │ │minimize button. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Views of this object have a │ │ │ │minimize button as opposed to │ │ │ │a hide button. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │ │The default is the current │ │ │ │system Button appearance for │ │ │ │windows setting. This cannot │ │ │ │be specified here. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ICONFILE │filename │Sets the object's icon. This │ │ │ │is equivalent to calling │ │ │ │wpSetIconData. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ICONPOS │x, y │Sets the object's initial icon│ │ │ │position in a folder. The x │ │ │ │and y values represent the │ │ │ │position in the folder in │ │ │ │percentage coordinates. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ICONRESOURCE │id, module │Sets the object's icon. This │ │ │ │is equivalent to calling │ │ │ │wpSetIconData. The "id" is the│ │ │ │icon resource ID in the │ │ │ │dynamic link library (DLL) │ │ │ │"module". │ ├──────────────────┼────────────┼──────────────────────────────┤ │MINWIN │HIDE │Hides views of object, when │ │ │ │the minimize button is │ │ │ │selected. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │VIEWER │Minimizes views of the object │ │ │ │to Minimize window to viewer, │ │ │ │when the minimize button is │ │ │ │selected. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │DESKTOP │Minimizes views of the object │ │ │ │to Minimize window to Desktop,│ │ │ │when the minimize button is │ │ │ │selected. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │ │The default is the current │ │ │ │Minimize button setting. This │ │ │ │cannot be specified here. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOCOPY │YES │Users cannot copy objects. │ │ │ │This is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NOCOPY style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can copy objects. This │ │ │ │is the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NODELETE │YES │Users cannot delete objects. │ │ │ │This is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NODELETE style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can delete objects. This│ │ │ │is the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NODRAG │YES │Users cannot drag objects. │ │ │ │This is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NODRAG style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can drag objects. This │ │ │ │is the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NODROP │YES │No other objects can be │ │ │ │dropped on this object. This │ │ │ │is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NODROPON style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Objects can be dropped on this│ │ │ │object. This is the default │ │ │ │value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOLINK │YES │Objects cannot be linked. This│ │ │ │is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NOLINK style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Objects can be linked. This is│ │ │ │the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOMOVE │YES │Users cannot move objects. │ │ │ │This is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NOMOVE style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can move objects. This │ │ │ │is the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOPRINT │YES │Users cannot print objects. │ │ │ │This is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NOPRINT style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can print objects. This │ │ │ │is the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NORENAME │YES │Users cannot rename objects. │ │ │ │This is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NORENAME style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can rename objects. This│ │ │ │is the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOSETTINGS │YES │Users cannot open the object's│ │ │ │Settings notebook. This is │ │ │ │equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NOSETTINGS style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can open the object's │ │ │ │Settings notebook. This is the│ │ │ │default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOSHADOW (Same as │YES │Users cannot create shadows of│ │NOLINK) │ │objects. This is equivalent to│ │ │ │calling wpSetStyle with the │ │ │ │OBJSTYLE_NOLINK style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users can create shadows of │ │ │ │objects. This is the default │ │ │ │value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │NOTVISIBLE │YES │Objects are not visible. This │ │ │ │is equivalent to calling │ │ │ │wpSetStyle with the │ │ │ │OBJSTYLE_NOTVISIBLE style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Objects are visible. This is │ │ │ │the default value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │OBJECTID │<name> │Sets a persistent ID for the │ │ │ │object. The OBJECTID can be │ │ │ │used to obtain a pointer or │ │ │ │handle to the object by │ │ │ │calling wpclsQueryObject or │ │ │ │WinQueryObject. An OBJECTID is│ │ │ │any unique string preceded │ │ │ │with a < and terminated with a│ │ │ │>. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │ │The default is to not have an │ │ │ │ID. │ ├──────────────────┼────────────┼──────────────────────────────┤ │OPEN │SETTINGS │Opens settings view when │ │ │ │object is created or when │ │ │ │WinSetObjectData is called. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │DEFAULT │Opens the default view when an│ │ │ │object is created or when │ │ │ │WinSetObjectData is called. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │ │The default is to not open a │ │ │ │view. │ ├──────────────────┼────────────┼──────────────────────────────┤ │TEMPLATE │YES │Users can create object │ │ │ │template. This is equivalent │ │ │ │to calling wpSetStyle with the│ │ │ │OBJSTYLE_TEMPLATE style. │ ├──────────────────┼────────────┼──────────────────────────────┤ │ │NO │Users cannot create object │ │ │ │template. This is the default │ │ │ │value. │ ├──────────────────┼────────────┼──────────────────────────────┤ │TITLE │Title │Sets the object's title. This │ │ │ │is equivalent to calling │ │ │ │wpSetTitle. │ └──────────────────┴────────────┴──────────────────────────────┘
The following code fragments is an example of WPObject setup string:
PSZ pszSetupString = "TITLE = MYObject;" "ICONFILE = MYOBJ.ICO;" "OBJECTID = <MyObjectID>";