gmSCControlDataClass
- Mark Juras
Owned by Mark Juras
The ControlData Service Class
The service class ControlData accesses information about controls which was compiled from the property bag specifications in the various form files.The method ControlData_FindObjects
Prototypeint ControlData_FindObjects(int iRoot,tObjInfo* objInfo,int maxObjects);
Member | Description |
level | Specifies the nesting level of the control relative to the initial parent |
root | Specifies the root offset of the control in its storage area. |
type | Specifies the object type of the control. |
count | Specifies the number of collection members in the control. |
resource | always set to zero here. |
The parameters of the method are as follows:
Parameter | Description |
iRoot | Specifies the root offset of the parent of the controls to be found. |
objInfo | Receives the tObjInfo records for each control found in the order in which they are found. |
maxObjects | Specifies the maximum number of entries allowed in the objInfo parameter. |
This method returns the number of interface objects found.
The method ControlData_FindProperty
Prototypeint ControlData_FindProperty(int ctlType,char* propName,int iCode);
Parameter | Description |
ctlType | Specifies the type of the control whose property value is to be found. It is either an opcode value or the root offset of a control class or coclass. |
propName | is the name of the property. This is either a subcode name of the opcode or the name of a property in the scope of the class or coclass. It is in null-terminated form. |
iCode | is the starting offset in the global code block where the search for the assignment should begin. |
If the property is recognized and if an assignment to that property is present then its code starting offset is returned; else zero is returned.
The method ControlData_GetFontSize
Prototypeint ControlData_GetFontSize(int iCode,int inXml,char* value);
Parameter | Description |
iCode | Specifies the starting offset in the global code block of the right-hand-side of an assignment to the font size property. This will typically be determined by the method ControlData_FindProperty. |
inXml | Specifies how the result is to be determined. If zero, the result string is simply the return value from ControlData_GetProperty whose size units are in Points. In XML, all sizes are in logical Pixels -- i.e., 72 points/inch versus 96 pixels/inch for scaling used in Xml |
value | Receives the string representation derived from the right-hand-side code, in null terminated form, as modified for use in Xml contexts. |
The method returns the length of the result.
The method ControlData_GetProperty
Prototypeint ControlData_GetProperty(int iCode,int inXml,char* value);
Property | Description |
iCode | Specifies the starting offset in the global code block of the right-hand-side of an assignment to the desired property. This will typically be determined by the method ControlData_FindProperty. |
inXml | Specifies if the value is to be modified. If it is nonzero, then any quote characters or less than characters in value string will be replaced by """ or "<" respectively. |
value | Receives the authored value string derived from the right-hand-side code, in null terminated form. The standard code authoring method is used to produce this string. |
The method returns the length of the result string.
The method ControlData_GetValue
Prototypeint ControlData_GetValue(int iCode);
Parameter | Description |
iCode | Specifies the starting offset in the global code block of the right-hand-side of an assignment to the desired property. This will typically be determined by the method ControlData_FindProperty. |
If the property value is numeric or an enumeration entry, then its integer value is returned; else a zero is returned.
The method ControlData_LoadCode
Prototypeint ControlData_LoadCode(int ctlRoot,int cmpOnly);
Parameter | Description |
ctlRoot | Specifies the root offset of the control whose code vector is to be accessed. |
cmpOnly | Specifies what code is to be used. If nonzero, the original compiled code only should be used, not the modified analysed code. |
If the control has no code vector associated with it of the requested type, then a zero is returned; else its starting offset is returned. Note that when the code vector is no longer needed the user must reset the global code vector size back to this value.
The method ControlData_ReplaceValue
Prototypeint ControlData_ReplaceValue(int iCode,int opc,int subc);
Parameter | Description |
iCode | Specifies the offset in the global code block of the value code to be replaced. |
opc | Specifies the opcode of the replacement value. |
subc | Specifies the subcode value of the replacement. |
There is no requirement that the size of the replacement code be the same as the size of the original code; therefore, the method returns the final size of the global code block.
The method ControlData_SaveCode
Prototypevoid ControlData_SaveCode(int ctlRoot,int iStart);
Parameter | Description |
ctlRoot | Specifies the root offset of the control whose code vector is to be saved. |
iStart | Specifies the start in the global code block of the code to be saved. |
The method has no return value.
Table of Contents