Launching an MFC Dialog with ActiveX Controls
- Updated2024-11-26
- 1 minute(s) read
Launching an MFC Dialog with ActiveX Controls
Purpose
This example demonstrates how to launch a Microsoft Foundation Classes (MFC) dialog box that contains an ActiveX control when you call the MFC DLL from TestStand.
Example File
Location
<TestStand Public>\Examples\Fundamentals\Launching an MFC dialog With ActiveX Controls\Launching an MFC dialog With ActiveX Controls.seq
Highlighted Features
Sequence Call step
Major API
N/A
Prerequisites
None
How to Use This Example
This example shows how to create and properly initialize a thread so it can launch an MFC dialog box that contains ActiveX controls. TestStand must initialize all execution threads for the ActiveX multithreaded concurrency model. MFC requires that any thread that launches a dialog box that contains ActiveX controls must be initialized as apartment-threaded. Therefore, to launch such a dialog box, you must create a temporary worker thread you initialize as apartment-threaded and have the worker launch the dialog box. Meanwhile, the original thread TestStand uses to call the function must wait for the worker thread to exit.