10-07-2011 05:49 AM
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.
10-13-2011 02:39 AM
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