02-21-2016 11:42 AM
RH640 ha scritto:Actually, I did check the result of SetCtrlVal at one point and it returned zero which I think is success.
PANEL is a macro that evaluates to an integer, the same datatype as the panel handle. If by chance PANEL macro and panelHandle variable evaluate to the same value your program will work without problems and you won't get any error. Nevertheless, as far as the application grows and more panel are added to the UIR file and loaded in memory the possibility that those values match will become less probable and you are likely to get any sort of error while addressing controls.
02-21-2016 11:49 AM
Wolfgang ha scritto:I also have a side note (related to Roberto's comment): whereas you check your function calls DisplayPanel () and RunUserInterface () for errors, you don't do so with SetCtrlVal (); you should and probably it will tell what Roberto already mentioned
As an addition to your side note, checking return value of RunUserInterface with errChk macro is not necessarily correct: RunUserInterface does not return an error code, it returs the value passed to QuitUserInterface instead.