Purpose

This example demonstrates how to use C++ to show step execution progress and status in the TestStand Sequence Editor or Execution window.

Example File Location

<TestStand Public>\Examples\Modifying User Interfaces\Updating the Status Bar Using UI Messages\MFC\Updating the Status Bar Using UI Messages.seq

Highlighted Features

  • C/C++ DLL Adapter
  • Execution

Major API

None

Prerequisites

None

How to Use This Example

AppWizard creates DisplayingProgressAndStatus.dll, which demonstrates the basics of using the Microsoft Foundation Class (MFC) Library and serves as a starting point for writing a custom DLL.

The following files, located in the <TestStand Public>\Examples\Modifying User Interfaces\Updating the Status Bar Using UI Messages\MFC directory, make up DisplayingProgressAndStatus.dll:

  • DisplayingProgressAndStatus.h—The main header file that declares the CDisplayingProgressAndStatusApp class for the DLL.
  • DisplayingProgressAndStatus.cpp—The main DLL source file that contains the CDisplayingProgressAndStatusApp class.
  • DisplayingProgressAndStatus.rc—A list of all the Microsoft Windows resources the program uses, including icons, bitmaps, and cursors stored in the res subdirectory. You can directly edit this file in Microsoft Developer Studio.
  • res\DisplayingProgressAndStatus.rc2—Contains resources Developer Studio does not edit. Place all resources the resource editor cannot edit in this file.
  • DisplayingProgressAndStatus.def—Contains DLL information that must be provided to run with Windows. This file defines parameters such as the name and description of the DLL and exports functions from the DLL.
  • DisplayingProgressAndStatus.clw—Contains information ClassWizard uses to edit existing classes, add new classes, and store information required to create and edit message maps and dialog data maps and to create prototype member functions.

Other standard files located in the <TestStand Public>\Examples\Modifying User Interfaces\Updating the Status Bar Using UI Messages\MFC directory include the following:

  • StdAfx.h and StdAfx.cpp—Used to build a precompiled header (PCH) file named DisplayingProgressAndStatus.pch and a precompiled types file named StdAfx.obj.
  • Resource.h—The standard header file that defines new resource IDs. Developer Studio reads and updates this file.
Note AppWizard uses TODO: to indicate parts of the source code to which you must add or that you must customize.