C
PROGRESSBAR * PbCreate( WORD ID, SHORT left, SHORT top, SHORT right, SHORT bottom, WORD state, WORD pos, WORD range, GOL_SCHEME * pScheme );
Overview
This function creates a PROGRESSBAR object with the parameters given. It automatically attaches the new object into a global linked list of objects and returns the address of the object.
Input Parameters
Input Parameters |
Description |
WORD ID |
Unique user defined ID for the object instance. |
SHORT left |
Left most position of the Object. |
SHORT top |
Top most position of the Object. |
SHORT right |
Right most position of the Object. |
SHORT bottom |
Bottom most position of the Object. |
WORD state |
Sets the initial state of the Object. |
WORD pos |
Defines the initial position of the progress. |
WORD range |
This specifies the maximum value of the progress bar when the progress bar is at 100% position. |
GOL_SCHEME * pScheme |
Pointer to the style scheme used for the object. Set to NULL if default style scheme is used. |
Returns
Returns the pointer to the object created
Preconditions
none
Side Effects
none
Example
PROGRESSBAR *pPBar; void CreateProgressBar(){ pPBar = PbCreate(ID_PROGRESSBAR1, // ID 50,90,270,140, // dimension PB_DRAW, // Draw the object 25, // position 50, // set the range NULL); // use default GOL scheme while(!PbDraw(pPBar)); }