Step Through Form Fields in C (ActiveX)
I would like to step through the fields in a form (similar to VB's "For Each Field in Felds").......but I am confined to a C environment. I created an ActiveX controller for Adobe and for AFORMAUT. The code below works.......I just need to figure what to put in the "For" loop to step through the list of fields.....any suggestions? The ActiveX controller does not provide a lot of help......
//Open Acrobat, Open File, Show Acrobat
Acrobat_NewCAcroApp (NULL, 1, LOCALE_NEUTRAL, 0, &acroHandle);
AFORMAUTLib_NewIAFormApp (NULL, 1, LOCALE_NEUTRAL, 0, &formHandle);
Acrobat_NewCAcroAVDoc (NULL, 1, LOCALE_NEUTRAL, 0, &avHandle);
Acrobat_CAcroAVDocOpen (avHandle, NULL, datasheetPath, "TEMP OPEN", NULL);
Acrobat_CAcroAppShow (acroHandle, NULL, NULL);
//Get Form Fields, Count, Get Value, IsReq, IsHidden, IsReadOnly, Type
AFORMAUTLib_IAFormAppGetFields (formHandle, NULL, &axHandle);
AFORMAUTLib_IFieldsGetCount (axHandle, NULL, &fieldCount);
AFORMAUTLib_IFieldsGetItem (axHandle, NULL, "UUTPartNumber", &fieldHandle);
AFORMAUTLib_IFieldGetValue (fieldHandle, NULL, &fieldGetVal);
AFORMAUTLib_IFieldGetIsRequired (fieldHandle, NULL, &fieldGetReq);
AFORMAUTLib_IFieldGetIsHidden (fieldHandle, NULL, &fieldGetHid);
AFORMAUTLib_IFieldGetIsReadOnly (fieldHandle, NULL, &fieldGetRO);
AFORMAUTLib_IFieldGetType (fieldHandle, NULL, &fieldGetType);
for (i = 1; i <= fieldCount; i++)
{
//How do I step through the fields and get their names in an array?
}
