LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use installpopup in multithreading?

i build a new thread in my test program,in this program i a installpopup to show a PANEL,when this panel is displayed the test must stop,and when this panel is closed,the test is go on.so when the panel display i want the pre-panel no used,but when i write below code,this cann't realised,can you tell me the reason? and what can i do?

static int cvicallback testthread (void *functionData)
//thread of test
{
.....
hanel=LoadPanel (0, "panels.uir", PANEL);
while(true)
{
procedure1();
}
.....
}

void procedure1(void)
{
InstallPopup(handel);
RunUserInterface();
}
0 Kudos
Message 1 of 2
(2,808 Views)
You are calling RunUserInterface inside your procedure1() function, but I assume the user interface was already started before the testthread() function was called. You don't need to execute RunUserInterface more than once in your program; moreover, a second instance of the user interface can cause several unexpected behaviours. Try commenting out this line and see if all works well this way.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,808 Views)