LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Threadsafe Modal Dialog

Is there any way to do a thread safe, properly operating modal dialog panel?

 

I want to issue popups from within a thread.  Using the standard MessagePopup() displays the dialog box, but it does not block events in the other threads.  Which is to say that one can click anything else on the main panel, putting the popup in the background. 

 

Perhaps there is some kind of signalling that can be implemented between a function launched from the thread via PostDeferredCall(), so that the thread pauses until the popup is closed?

0 Kudos
Message 1 of 2
(3,044 Views)

hendra:

 

 If you just need a simple, standard dialog box, you can use the Windows SDK MessageBox function to create a system modal dialog box.  System modal dialogs stay on top of all other applications.  See my old example here: http://forums.ni.com/t5/LabWindows-CVI/MessagePopup-dissappears-behind-active-panel/m-p/182045#M1409...

 

If you need a more custom dialog, as an experiment I created a CVI project which simulates a system modal dialog by taking back focus on a fast firing timer.  See my discussion and example here: http://forums.ni.com/t5/LabWindows-CVI/Make-panel-modal-from-a-CVI-dll/m-p/1316925#M50035

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