GetObjID Macro

Microchip Graphics Library

Microchip Graphics Library
GetObjID Macro
C
#define GetObjID(pObj) ((OBJ_HEADER *)pObj)->ID
Overview

This macro returns the object ID.

Input Parameters
Input Parameters 
Description 
pObj 
Pointer to the object of interest. 
Returns

Returns the ID of the object.

Preconditions

none

Side Effects

none

Example
void UseOfGetObjID(OBJ_HEADER *pObj) {
    WORD id;
        switch(id = GetObjID(pObj)) {
            case ID_WINDOW1:
                // do something
            case ID_WINDOW2:
                // do something else
            case ID_WINDOW3:
                // do something else
            default:
                // do something else
        }
}
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved