Accessing the User Pointer for the Current Field or Form

To reference the user pointer installed in the above example from within your validation function, use the user pointer get function, userp_get():

int value;

value = *((int *) userp_get(curdfldp(dfmp)) );

This code references the user pointer for the current field with userp_get() and casts it to a pointer to an integer. The value of the user pointer is assigned to the variable value.

To access the user pointer for a form, you call the same function, userp_get().


Home Contents Previous Next