LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

non-fatal run-time error

Hi~
I'm not good at english, but I want to ask you about my program.
 
There is a Error "Non-Fatal Run-Time Error" at SerCtrlVal()
 
I can't find what makes the error.
I tried several time,
 I couldn't find it.
 
As a beginner, I want to know my miss.
I'm a 8.0 user.
 
please answer me, 
0 Kudos
Message 1 of 2
(3,108 Views)
Hi Chocomoos,

When using SetCtrlVal() on the controls that are on the Tab Pages you'll want to pass the handle to the Tab Panel.

So I added to the top of your munsu.c:
int TabPanelHandle1;
int TabPanelHandle2;

Then in your Initialize_DataView() function I added:
GetPanelHandleFromTabPage (PanelHandle, PANEL_TAB, 0, &TabPanelHandle1);
GetPanelHandleFromTabPage (PanelHandle, PANEL_TAB, 1, &TabPanelHandle2);

and I changed your SetCtrlVal() functions to pass in the TabPanelHandle1 or 2 depending on which tab page the control is on.  So it would look like:

SetCtrlVal(TabPanelHandle1, TabPanel_1_Chk_D1_830_Ch9, status.Chk_D1_830_Ch9);

Then, you'll also need to fix it in the rest of your code.

Let me know if you have any questions.
Kristen
National Instruments
0 Kudos
Message 2 of 2
(3,071 Views)