02-03-2006 12:50 PM
02-03-2006 01:33 PM
I would suggest you to check carefully all the parameters passed to SetCtrlVal. From the notation you use, it seems that all of them are macros that are translated in preprocessing into actual values, so I'd go and check where OFF is defined and how.
But I would like to turn your attention to PANEL macro: this is usually the macro name associated to a single panel by the UIR editor, but it is NOT the handle associated to it, which is the actual values expected by SetCtrlVal function. The system manages controls addressing them by the ordering number given in the include file associated to the UIR and via the panel handle returned by LoadPanel function. That is: SetCtrlVal (panelHandle, PANEL_NUMERIC, value); must be read like: put "value" into the i-th control on the panel addressed by panelHandle variable.
It is possible that PANEL macro translates exactly in the same value of panelHandle obtained when you load the panel, but this can happen only by chance and cannot be assumed as a rule. What I am saying is that probably your program is actually trying to fill in a different control from the one you expect. Maybe this structure was working in the older IDE but in the new the handle differs from PANEL macro value. You could place a breakpoint and see the value of panelHandle and PANEL: they will be probably different and you will need to modify all the functions the use PANEL macro passing panelHandle instead.
Hope all this can help you
Roberto
02-03-2006 04:29 PM
Yep, that was it exactly. I figured that out after I posted. I'm replacing all PANEL references with the actual handle name and life is good.
Thanks for the help