wpCreateShadowObject
Appearance
This instance method is called to create a shadow of an object.
Syntax
_wpCreateShadowObject(somSelf, Folder, fLock)
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
- Folder (WPFolder *) - input
- Pointer to a Folder object.
- A pointer to a Folder object in which to place the new shadow object. This pointer can be determined by issuing a call to the wpclsQueryFolder method.
- fLock (BOOL) - input
- Lock object flag.
- If this flag is false, the new shadow object will be made dormant whenever the object and the folder containing the object are closed.
- If this flag is true, the new object will remain awake until the caller issues the wpUnlockObject method on it.
Returns
- rc (WPObject *) - returns
- Pointer to the new shadow object.
- A return value of NULL indicates that an error occurred.
Remarks
The new object is created as an instance of class **WPShadow**.
Usage
This method can be called at any time in order to create a shadow object for this object.
How to Override
This method is generally not overridden.
Example Code
This example creates a shadow of the Desktop.
#define INCL_WINWORKPLACE #include <os2.h> SOMAny *objDesktop; SOMAny *objSysShadow; /* Get the object pointer of the desktop folder */ objDesktop = _wpclsQueryFolder( _WPFolder , "<WP_DESKTOP>" /* Folder location */ ,TRUE); /* Keep active */ /* Create a shadow of the desktop */ objSysShadow = _wpCreateShadowObject( self , objDesktop /* Object to shadow */ ,FALSE); /* Make dormant when folder closes */