LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Multithreading: doesn´t update UIR

Solved!
Go to solution

 

Hi, 

 

From my main panel (UIR) and through this functions:

 

CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, Myfunction, (void *) &DataMyfunction, &threadID);
CmtWaitForThreadPoolFunctionCompletion(DEFAULT_THREAD_POOL_HANDLE, threadID,OPT_TP_PROCESS_EVENTS_WHILE_WAITING);

 

I display a new panel 

 

Myfunction

 

DisplayPanel2()

ProcessSystemEvents() 

ProcessDrawEvents()

 

Another_function() 

 

DisplayPanel3() 

 

 

 

 

Another_function 

{

 

Update Value controls and color label controls (for the 2nd panel)

 

}

 

 

The problem is that the control value update its value always I change It with SetCtrVal

But the label color doesn´t change its value always I change it with SetCtrlAtribute (, ATTR_LABEL_COLOR, ))

 

It only changes when I Display a 3th panel.

 

 

I think ProccesSystemEvents() should solve this problem

 

 

Any Ideas?

 

 

 

 

 

 

Message Edited by norak on 03-24-2010 10:54 AM
Message Edited by norak on 03-24-2010 10:55 AM
Message Edited by norak on 03-24-2010 10:56 AM
0 Kudos
Message 1 of 3
(3,307 Views)
Solution
Accepted by topic author norak
SetCtrlAtribute() does not redraw.  Would you not want to call ProcessDrawEvents() after the call to AnotherFunction()
Message 2 of 3
(3,269 Views)

 

ok,

 

Calling ProcessDrawEvents() after a SetCtrlAttribute(), the UIR updates.

 

I need do so, because the UIR need to update after each change, not after all changes...

 

Thanks a lot for your replay

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