AVCXCLASSES( ) Function
Places the information about classes in a class library into an array.
AVCXCLASSES(ArrayName, cLibraryName)
Return Values
Numeric
Parameters
ArrayName
Specifies the name of the array in which the class information is placed. If the array you specify doesn't exist, Visual FoxPro automatically creates the array. If the array exists and isn't large enough to contain the class names and base classes, Visual FoxPro automatically increases the size of the array. If the array is larger than necessary, Visual FoxPro truncates the array.The array contains a row for each class in the class library, and each row contains 11 columns containing information about the class. The following table lists the class information in each column.
Column Class information .VCX field name 1 Class name. OBJNAME 2 Base class of the class. BASECLASS 3 Parent class name of the class. CLASS 4 Relative path and file name of the parent class library. CLASSLOC 5 Relative path and file name of the bitmap for a custom class icon. RESERVED4 6 Relative path and file name for a custom Project Manager or Class Browser class icon. RESERVED5 7 ScaleMode of the class, Pixels or Foxels. RESERVED6 8 Description of the class. RESERVED7 9 Relative path and file name for the #INCLUDE file for the class. RESERVED8 10 User-defined information for the class. USER 11 Logical true (.T.) if the class is OLEPUBLIC, otherwise logical false (.F.). RESERVED2 cLibraryName
Specifies the name of the class library for which AVCXCLASSES( ) places class information into the array specified with ArrayName. cLibraryName can contain a path to the class library. An error is generated if the class library you specify doesn't exist.
Remarks
AVCXCLASSES( ) returns the number of rows in the array (the number of classes in the class library).
Example
The following example uses AVCXCLASSES( ) to create and populate an array named aClasses with the names and base classes of the classes in the Buttons class library. DISPLAY MEMORY lists the contents of the array in the main Visual FoxPro window.
ACTIVATE SCREEN
CLEAR
? AVCXCLASSES(aClasses, '\VFP\SAMPLES\CLASSES\BUTTONS.VCX')
*** Displays 5
FOR nColCount = 1 TO ALEN(aClasses,2) && Loop through columns
? aClasses(1, nColCount) && Each column of the 1st class
NEXT
*** Displays the following:
* cmdCancel
* commandbutton
* cmdok
* buttons.vcx
* cancel.bmp
* cancel.bmp
* Pixels
* Release Form or Form Set
* .F.