Purpose

This example demonstrates how to use C++ and the TestStand API to create a dialog box that is modal to the TestStand main application window.

Example File Location

<TestStand Public>\Examples\Fundamentals\Launching a Modal Dialog\MFC\Launching a Modal Dialog.seq

Highlighted Features

  • Modal dialog boxes
  • TestStand API

Major API

  • Engine.NotifyStartOfModalDialogEx
  • Engine.NotifyEndOfModalDialog

Prerequisites

C++ compiler

How to Use This Example

This example uses a C/C++ DLL Action step to call a function in a C++ DLL to create a modal dialog box.

To review how the function behaves, open ExampleModalDlg.cpp located in the <TestStand Public>\Examples\Fundamentals\Launching a Modal Dialog\MFC directory. The function calls the Engine.NotifyStartOfModalDialogEx method, which instructs the TestStand Engine that the DLL is creating a modal dialog box. After the dialog box is dismissed, the function calls the Engine.NotifyEndOfModalDialog method to end the modal dialog box state.