LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i know which one is checked ,when i use radiogroup?

When i use GetMarkedOption like
 
 "Radio_GetMarkedOption (GUIPANEL, RUNCTRTAB_RUNCONTROL, &runmode);"
 
where GUIPANEL is my panel name, RUNCTRTAB_RUNCONTROL is the name of RadioGroup , and runmode is int type.
 
I' m puzzlled about a run-time error ,
 
" NON-FATAL RUN-TIME ERROR:   "gui.c", line 68, col 14, thread id 0x00000284:   Library function error (return value == -13 [0xfffffff3]). Invalid control ID".
but in the .h files , there is already
 
"#define  RUNCTRTAB_RUNCONTROL            14".
 
0 Kudos
Message 1 of 3
(3,095 Views)
You are using GUIPANEL as the first parameter in the functions, which is the panel name defined in the uir file.
You should use the panel handle instead, returned from LoadPanel function when loading the panel.
 
Since this GUIPANEL macro is converted into a numeric value, you are actually addressing a control on a panel loaded in memory whose handle corresponds to the value associated to the macro in the include file of your gui, which is evidently different from the panel handle associated to the panel you want to operate on.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,090 Views)

thank you for your replay~~

i have solved the problem~~

0 Kudos
Message 3 of 3
(3,051 Views)