C
#define GetObjNext(pObj) ((OBJ_HEADER *)pObj)->pNxtObj
Overview
This macro returns the next object after the specified object.
Input Parameters
Input Parameters |
Description |
pObj |
Pointer to the object of interest. |
Returns
Returns the pointer of the next object.
Preconditions
none
Side Effects
none
Example
// This is the same example for the GetObjType() macro // We just replaced one line void RedrawButtons(void) { OBJ_HEADER *pCurr; pCurr = GOLGetList(); // get active list while(pCurr->pNxtObj != NULL) { if (GetObjType(pCurr) == BUTTON) pCurr->state = BTN_DRAW; // set button to be redrawn pCurr = GetObjNext(pCurr); // Use of GetObjNext() macro // replaces the old line } GolDraw(); // redraw all buttons in the // active list }