06-17-2014 02:57 PM
Hello -
I'm trying to use SetMouseCursor to switch to VAL_HOUR_GLASS_CURSOR during a file processing operation that takes a few seconds. For some reason, the cursor appearance never changes from the default cursor. The operation is initiated by a button "commit" event, and the callback looks something like this:
int CVICALLBACK buttonCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
SetMouseCursor(VAL_HOUR_GLASS_CURSOR);
// Do the file processing here...
SetMouseCursor(VAL_DEFAULT_CURSOR);
break;
}
return 0;
}
I've also tried using SetPanelAttribute(panel, ATTR_MOUSE_CURSOR, ...) with the same results. The callback definitely executes, as the file processing works as expected - I just don't see the cursor change for some reason.
I'm using LabWindows CVI 2012 SP1, running under Windows 7. Thanks in advance!
Barry Wealand
06-17-2014 03:08 PM
06-17-2014 03:13 PM
SetWaitCursor() seems to work fine. Thanks for the assist! --Barry
06-17-2014 03:15 PM - edited 06-17-2014 03:18 PM
Great..! Nice to hear it worked.
Do not forget to mark the post as accepted solution.
Have a nice day 😉