WpCnrSetEmphasis: Difference between revisions
Created page with "{{DISPLAYTITLE:wpCnrSetEmphasis}} This instance method is called to allow the object to change its visual emphasis. ==Syntax== _wpCnrSetEmphasis(somSelf, ulEmphasisAttr, fTurnOn) ==Parameters== ;''somSelf'' (WPObject *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPObject. ;''ulEmphasisAttr'' (ULONG) - input :Record attributes of the container. :Any or all of the following flags can be combined using..." |
(No difference)
|
Latest revision as of 06:00, 4 November 2025
This instance method is called to allow the object to change its visual emphasis.
Syntax
_wpCnrSetEmphasis(somSelf, ulEmphasisAttr, fTurnOn)
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
- ulEmphasisAttr (ULONG) - input
- Record attributes of the container.
- Any or all of the following flags can be combined using the logical OR (|) operator:
- CRA_CURSORED Specifies that a record will be drawn with a selection cursor.
- CRA_DISABLED Specifies that a record will be drawn with unavailable-state emphasis.
- CRA_INUSE Specifies that a record will be drawn with in-use emphasis.
- CRA_PICKED Specifies that the record will be drawn with "picked" emphasis; for example, it is part of a lazy drag set.
- CRA_SELECTED Specifies that a record will be drawn with selected-state emphasis.
- CRA_SOURCE Specifies that a record will be drawn with source-menu emphasis.
- fTurnOn (BOOL) - input
- Flag indicating whether the specified attributes are to be set or reset.
- TRUE Set the specified attributes.
- FALSE Reset the specified attributes.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is generally not overridden.
Usage
This method can be called at any time in order to set the emphasis for an object in an open folder. Some restrictions apply as to which CRA_* flags can be used.
Remarks
This method provides a way to change the visual emphasis of an object. Visual emphasis can be used to give the user feedback as to the state of the object. For example, when a folder is opened on the desktop, in-use emphasis is added to the folder icon. The Workplace Shell accomplishes this by calling wpCnrSetEmphasis on the object.
This method is called automatically to set and reset the CRA_INUSE emphasis state during the processing of the wpAddToObjUseList and wpDeleteFromObjUseList methods, respectively.
This method is valid only for objects inserted into a container control using wpCnrInsertObject/wpclsInsertMultipleObjects.
This method sends CM_SETRECORDEMPHASIS to the container. The CRA_* flags specified for the ulEmphasisAttr parameter are the same as those used for CM_SETRECORDEMPHASIS.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulEmphasisAttr; /* Record attributes of the container. */
BOOL fTurnOn; /* Flag indicating whether the specified attributes are to be set or reset. */
BOOL rc; /* Success indicator. */
rc = _wpCnrSetEmphasis(somSelf, ulEmphasisAttr,
fTurnOn);