C
#define GetState(pObj, stateBits) (((OBJ_HEADER *)pObj)->state & (stateBits))
Overview
This macro retrieves the current value of the state bits of an object. It is possible to get several state bits.
Input Parameters
Input Parameters |
Description |
pObj |
Pointer to the object of interest. |
stateBits |
Defines which state bits are requested. Please refer to specific objects for object state bits definition for details |
Returns
Macro returns a non-zero if any bit in the stateBits mask is set.
Preconditions
none
Side Effects
none
Example
#define BTN_HIDE 0x8000 BUTTON *pB; // pB is created and initialized // do something here to set state // Hide the button (remove from screen) if (GetState(pB,BTN_HIDE)) { SetColor(pB->pGolScheme->CommonBkColor); Bar(pB->left,pB->top,pB->right,pB->bottom); }