I am trying to use the GetTreeItemAttribute CVI function and get the check box state information from a tree and store in a array, but the compiler just gives me errors showing
NON-FATAL RUN-TIME ERROR: "Test.c", line 92, col 17, thread id 8188: Function GetTreeItemAttribute: (return value == -10 [0xfffffff6]). The control is not the type expected by the function。
the source code looks like following:
int panelID = 0;
int i;
int Mark_State;
char Flag[MAXNUMBER];
nullChk (InitCVIRTE (0, argv, 0));
errChk (panelID = LoadPanel (0, "test.uir", PANEL));
for (i = 0; i < MAXNUMBER; i ++){
GetTreeItemAttribute (panelID, TABTEST_TREE, i, ATTR_MARK_STATE, &Mark_State);
Flag[i] = Mark_State;
}
If possible, can somebody help me to take a look and see what is wrong with my code?
Thank you