Jump to content

wpQueryTrueStyle

From EDM2

This method is **specific to Version 4, or higher, of the OS/2 operating system** .

This instance method **allows the object to query its current class true style** .

Syntax

_wpQueryTrueStyle(somSelf) 

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked .
Points to an object of class WPObject .

Returns

ulnwQrySt (ULONG) - returns
Object styles .
Possible values include:
OBJSTYLE_CUSTOMICON: Icon is destroyed when object goes dormant.
OBJSTYLE_NOCOPY: This object cannot be copied.
OBJSTYLE_NODELETE: This object cannot be deleted.
OBJSTYLE_NODRAG: This object cannot be dragged.
OBJSTYLE_NODROP: No other object can be dropped on this object; however, this object can be dragged and dropped on other objects.
OBJSTYLE_NOMOVE: This object cannot be moved.
OBJSTYLE_NOPRINT: This object cannot be printed.
OBJSTYLE_NORENAME: This object cannot be renamed.
OBJSTYLE_NOSETTINGS: This object cannot be set.
OBJSTYLE_NOTVISIBLE: This object is hidden.
OBJSTYLE_TEMPLATE: This object is a template.
OBJSTYLE_LOCKEDINPLACE: Lock this object in place.

Remarks

The `wpQueryTrueStyle` method always returns the **persistent style of the object**, as last set by `wpModifyStyle` or `wpSetStyle` methods .

In contrast, the `wpQueryStyle` method returns the dynamic value of the style based on the current state of the object . For example, if an object is temporarily not moveable, `wpQueryTrueStyle` would return a style that does not contain the `OBJSTYLE_NOMOVE` flag, while `wpQueryStyle` would reflect this temporary state by returning a style that *does* contain the `OBJSTYLE_NOMOVE` flag . The `wpQueryStyle` method can be overridden by descendant classes to reflect temporary or cosmetic changes to an object's style .

To determine the **default style for an object class**, the `wpclsQueryStyle` method should be called .

Usage

This method can be **called at any time in order to determine the current last set style for an object** . This represents the **static definition of the object's style** .

How to Override

This method is **never overridden** .

Example Code

Declaration:

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject     *somSelf;    /* Pointer to the object on which the method is being invoked. */
ULONG        ulnwQrySt; /* Object styles. */

ulnwQrySt = _wpQueryTrueStyle(somSelf);

The following example lets you find the true style for an object:

ULONG ulTrueStyle;
ulTrueStyle = _wpQueryTrueStyle(somSelf);

Related Methods