The controlling of the position of the instances by the offsetThe offset of X,Y coordinateIt is possible to control the position of the instances of WSCvXXX class which has no window resource by the method: setXOffsetPtr and setYOffsetPtr. For example, the following event procedure with initializing trigger shows setting the offset.
extern short xoffset; //A
extern short yoffset; //A
void initep(WSCbase* object){
object->setXOffsetPt(&xoffset); //B
object->setYOffsetPt(&yoffset); //B
}
At first,define a global short variable somewhere and
do extern to access it at (A).
set it as offset to the instance at B.
Then the instance will be indicated at the position of the coordinate
which is added the offset variable.
It is possible to set same variable to many instances and
to control their position by it at once.
The scaling offset of the size of the intanceIt is possible to control the size of the instances of WSCvXXX class by the method: setScaleOffsetPtr. For example, the following event procedure with initializing trigger shows setting the scaling offset.
extern double scaleoffset; //A
void initep(WSCbase* object){
object->setScaleOffsetPt(&scaleoffset); //B
}
At first,define a global double variable somewhere and
do extern to access it at (A).
set it as scaling offset to the instance at B.
Then the instance will be indicated at the size which is multipled by
the scaling offset variable.
It is possible to set same variable to many instances and
to control their size by it at once.
Document Release 3.0 For Use with Wide Studio Release 3.0, Summer 2002
|