Monday, February 8, 2021

ActiveX test container

ActiveX test container

  1. MFC samples - Controls
  2. Samples for Visual Studio C++ are available on the web. Microsoft has produced many C++ samples that demonstrate different functionalities across multiple technologies. Here are a few of the places to find additional samples:

    OClient ActiveX Visual Editing container application, with drag and drop. tstCon implements an ActiveX control container using MFC's support for OLE embedding. You can use TSTCON to test ActiveX controls, change their properties, and invoke their methods.

    MFC samples - Visual C++ 2008 Feature Pack

  3. Testing Properties and Events with Test Container
  4. The Test Container application, shipped in Visual C++, is an ActiveX control container for testing and debugging ActiveX controls. Test Container allows the control developer to test the control's functionality by changing its properties, invoking its methods, and firing its events. Test Container can display logs of data-binding notifications and also provides facilities for testing an ActiveX control's persistence functionality: you can save properties to a stream or to substorage, reload them, and examine the stored stream data. This section describes how to use the basic features of Test Container. For additional information, select the Help menu while running Test Container..

  5. TSTCON Sample: ActiveX Control Test Container
  6. The TSTCON sample implements an ActiveX control container using MFC support for OLE embedding. You can use TSTCON to test ActiveX controls, change their properties, and invoke their methods. You can write scripts using the VBScript language to automate the testing of the controls. TSTCON can keep a log of the events and property change notifications fired by a control.

  7. ActiveX Test Container Application is Still Available
  8. The ActiveX Text Container tool is still available as a sample in Visual Studio 2008 and Visual Studio 2010. It is included in the Visual C++ samples ZIP file included with Visual Studio:

    • For VS2008, it’s in [Program Files]\Microsoft Visual Studio 9.0\Samples\1033\AllVCLanguageSamples.zip
    • For VS2010, it’s in [Program Files]\Microsoft Visual Studio 10.0\Samples\1033\VC2010Samples.zip
    The sample is named TSTCON and is in the C++\MFC\OLE\TstCon folder in the ZIP file. You can build this sample and run it to test the functionality of your ActiveX controls.

  9. Debugging a Data-Bound ActiveX Control
  10. If you are developing an ActiveX control that will be bound to a data source control, you can create your own container application and use that container to debug the ActiveX control.

    For example, you can create a dialog-based MFC application and place your data-bound control and a data source control on the dialog box. You can use this MFC application for run-time testing and as the container executable for debugging your data-bound ActiveX control.

  11. CA Tuesday Tip: Microsoft Test Container
  12. In Microsoft Visual Studio 2005 and previous releases, Microsoft released its Test Container as a executable.

    In Visual Studio 2005, the executable is located in the C:\Program Files\Microsoft Visual Studio 8\Common7\Tools directory and named tstcon32.exe.

    In Microsoft Visual Studio 2008 as subsequent releases, the Test Container is released as a project.

    In Microsoft Visual Studio 2008, the Test Container project is located in C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033\AllVCLanguageSamples.zip and drilling down to C++ \ MFC \ ole \ TstCon. Extract the TstCon directory to a user directory and then use Visual Studio to open and build the project.

    In Microsoft Visual Studio 2010, the Test Container project is located in C:\Program Files\Microsoft Visual Studio 10.0\Samples\1033\VC2010Samples.zip and drilling down to C++ \ MFC \ ole \ TstCon. Extract the TstCon directory to a user directory and then use Visual Studio to open and build the project.

  13. How to: Debug an ActiveX Control
  14. This is a paragraph.

  15. Sample Source Code
  16. On some systems you may not have proper access rights to the samples folders, you can try running Visual Studio with administrative rights or simply copy the folders somewhere else.

    Make sure you have the proper build platform selected (win32/x86/AnyCPU or x64) depending on the product (sample), and you have installed the right compiler for the project. (E.g., the 64 bit compiler is not installed with Visual Studio 2005 by default.)

    You must register the OCX files in order to use them or to build the .NET samples. The installer does register the OCX automatically, but you can reregister them using Microsoft's regsvr32.exe utility or the ActiveX Test Container that comes with Visual Studio. The test container in Visual Studio under "Tools/ActiveX Test container" is the 32 bit version.

    Please note if you are installing a 32 bit RTK on the 64 bit system the OXC/ActiveX controls are not registered by the installer. You must register the OCX/ActiveX controls manually.

  17. VC++:ActiveX Test Container
  18. VC++6.0安装后包含了ActiveX Test Container工具,位置为:   "C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools\TSTCON32.EXE"

  19. 使用ActiveX Control Test Container工具调式MapWinGIS
  20. 二、添加到VS2013工具箱路径中

    1. 1、VS2013中添加工具 (VS2013中文版)打开项目文件,在"工具" —> "外部工具"—>"添加"—> 标题中写入ActiveX Control Test Container —> 在命令中写入tstcon32.exe的全路径,如C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\tstcon32.exe —> 应用,确定。
    2. 2、项目属性中添加工具 上一步设置好后,打开项目属性 —> 配置属性中的 调试 —> 命令 中输入tstcon32.exe的全路径,如C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\tstcon32.exe —>应用,确定。

  21. This is a paragraph.

  22. This is a paragraph.

  23. This is a paragraph.

  24. This is a paragraph.

  25. This is a paragraph.

  26. This is a paragraph.

  27. This is a paragraph.

  28. This is a paragraph.

  29. This is a paragraph.

No comments:

Post a Comment