Use CALL SETCTLVALUE
I was wondering if someone out there could help me understand why I can't get SETCTLVALUE to work. I've watched the following in MacsBug, but the ContrlVal% field never gets set (even though the GETCTLVALUE function returns its value just fine):
On the other hand, when I set it manually it works like a charm:
I tried replacing the CALLSETCTLVALUE with the assembly version from the original header files, to make sure it wasn't an FB problem, but no luck. I understand why the second version works, but I don't understand why the first one won't. Any hints?
How does the control value you are setting compare to the control's min and max values? If it is out of range, SETCTLVALUE is probably ignoring it - whereas your direct field access bypasses any checks and sets it directly.
Something to look for...