LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a popup panel in a CVI DLL and keep it on top of the calling TestStand application window?

When I create a panel in CVI and use InstallPopup() to display it, the user can set the focus to the main TestStand window, which causes my popup to disappear underneath it.

I'm guessing I need the popup to be a child window of the main application window.  I've tried passing the Engine.AppMainHWnd handle as the parentHandle argument in LoadPanelEx(), but this causes an error, as it is not a valid handle.

Also, if I call another DLL function from a control callback within my popup, which creates another popup, on closing the second popup both disappear and the program is stuck in the RunUserInterface() of the first popup.

This seems a simple requirement, yet I don't seem to be able to find a straightforward way to achieve it.

0 Kudos
Message 1 of 2
(2,756 Views)

Steve,

 

I think this is more a TestStand question than a CVI question.

 

To use a CVI popup with TestStand, you should call TS_StartModalDialog() before InstallPopup().

 

When you quit your popup panel, you should call RemovePopup () and then TS_EndModalDialogAndDiscard().

 

The TSModalData must be the same for Start and End Modal dialog.

 

Bruno

0 Kudos
Message 2 of 2
(2,738 Views)