LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Picture ring animated control spinning problem

Solved!
Go to solution
Hello,

The picture ring animated control is not spinning for me as expexted.
In my main function after displaying the panel
AnimateCtrl_ConvertFromPictRing (panel, PNL_SPLASH_ANIMATION);
AnimateCtrl_SetAttribute (panel, PNL_SPLASH_ANIMATION,
ATTR_ANIMATE_ENABLED, 1);
AnimateCtrl_SetAttribute (panel, PNL_SPLASH_ANIMATION,
ATTR_ANIMATE_FRAME_INTERVAL, 0.05);
AnimateCtrl_SetAttribute (panel, PNL_SPLASH_ANIMATION, ATTR_ANIMATE_STOP_ON_LAST_FRAME, 0);

ProcessSystemEvents();

ProcessSystemEvents() line it is giving a runtime error

NON-FATAL RUN-TIME ERROR: "test.c", line 137, col 5, thread id 0x00000C38: Library function error (return value == -4 [0xfffffffc]). Panel, pop-up, or menu bar handle is invalid.

Can anyone help me out with this?

0 Kudos
Message 1 of 2
(3,257 Views)
Solution
Accepted by topic author SriVidya

1) The first thing to do is to include error checking. All functions you use provide a return value, but you prefer to ignore it. It's better, i.e. safer to check each function for proper operation. Instead of AnimateCtrl... use

status = AnimateCtrl...

if (status < 0 )...

 

2) The error returned 'Panel, pop-up, or menu bar handle is invalid' indicates that either panel is not a panel handle or 'PNL_SPLASH_ANIMATION' is not a valid picture ring control. Are these the constant names as defined in the include file of your UIR file?

0 Kudos
Message 2 of 2
(3,249 Views)