wpclsQueryStyle
Appearance
This method is called to allow the class object to specify the default object class style for its instances.
Syntax
_wpclsQueryStyle(somSelf)
Parameters
- somSelf (M_WPObject *) - input
- Pointer to the WPObject class object.
Returns
- ulReturn (ULONG) - returns
- Class style for this object.
- CLSTYLE_DONTTEMPLATE
- Do not allow a create-template operation on objects of this class.
- CLSTYLE_NEVERCOPY
- Do not allow a copy operation on objects of this class.
- CLSTYLE_NEVERDELETE
- Do not allow a delete operation on objects of this class.
- CLSTYLE_NEVERDRAG
- Do not allow a drag operation on objects of this class.
- CLSTYLE_NEVERDROPON
- Do not allow a dropon operation on objects of this class.
- CLSTYLE_NEVERLINK
- Do not allow a create-shadow operation on objects of this class.
- CLSTYLE_NEVERMOVE
- Do not allow a move operation on objects of this class.
- CLSTYLE_NEVERPRINT
- Do not allow a print of this object.
- CLSTYLE_NEVERRENAME
- Do not allow the renaming of objects of this class.
- CLSTYLE_NEVERSETTINGS
- Do not allow a settings operation on objects of this class.
- CLSTYLE_NEVERVISIBLE
- Make instances of this class always invisible.
Remarks
When an instance is initially created, it has the same object style (OBJSTYLE_xxx) flags as its class style (CLSSTYLE_xxx).
Usage
This method can be called at any time in order to determine the default style for instances of this class.
How to Override
This method should be overridden in order to modify the default object style for instances of this class.
Example Code
Declaration:
#define INCL_WINWORKPLACE #include <os2.h> M_WPObject *somSelf; /* Pointer to the WPObject class object. */ ULONG ulReturn; /* Class style for this object. */ ulReturn = _wpclsQueryStyle(somSelf);
This sample shows how to remove the Print option from the menu for BigObject.
SOM_Scope ULONG SOMLINK BigObjectM_wpclsQueryStyle(M_BigObject *somSelf) { /* M_BigObjectData *somThis = M_BigObjectGetData(somSelf); */ M_BigObjectMethodDebug("M_BigObject","BigObjectM_wpclsQueryStyle"); return ( parent_wpclsQueryStyle(somSelf) | CLSSTYLE_NEVERPRINT ); }