1 Star 2 Fork 0

eaglexmw/TstConn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
    SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->

<html><head><title>TSTCON Sample: ActiveX Control Test Container</title></head><body><h1>TSTCON Sample: ActiveX Control Test Container</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>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.</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note </th></tr><tr><td><p>This sample requires the Microsoft Calendar Control, which is installed with Microsoft Access.</p></td></tr></table></div><p>TSTCON also demonstrates several MFC programming topics, including the following topics:  </p><ul><li><p><MSHelp:link keywords="1DD78438-00E8-441C-B36F-9C4F9AC0D019" tabindex="0" >CCheckListBox</MSHelp:link>: A list box with a check box next for each item.</p></li><li><p><MSHelp:link keywords="FEE20B42-60AE-4AA9-83F9-5A3D9B96E33B" tabindex="0" >CDragListBox</MSHelp:link>: A list box in which you can drag the items to rearrange their order.</p></li><li><p>Implementing an Active Scripting Engine host (VBScript).</p></li><li><p>Implementing context-sensitive help for dialog boxes.</p></li></ul><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Security Note </th></tr><tr><td><p>This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.</p></td></tr></table></div><h1 class="heading">Building and Running the Sample</h1><div id="sectionSection0" class="seeAlsoNoToggleSection"><h4 class="subHeading">To build and run the TSTCON sample</h4><div class="subSection"><ol><li><p>Open the solution tstcon.sln.</p></li><li><p>On the <b>Build</b> menu, click <b>Build Solution</b>.</p></li><li><p>Run the test container application as a stand-alone application so it can register itself with the system.</p></li></ol></div><p>Alternately, you can open the sample test container application from the <b>Tools</b> menu in Visual Studio, as follows:</p><h4 class="subHeading">To launch a control in the container</h4><div class="subSection"><ol><li><p>In Visual Studio, from the <b>Tools</b> menu, launch the <b>ActiveX Control Test Container</b>.</p></li><li><p>In <b>ActiveX Control Test Container</b>, from the <b>Edit</b> menu, click <b>Insert New Control</b>.</p></li><li><p>In the <b>Insert New Control</b> dialog box, from the list box, select <b>Calendar Control</b>, and click <b>OK</b>. </p><p>The Microsoft Calendar Control appears in the upper half of the splitter window. Note that this control is installed with Microsoft Access. </p></li><li><p>Manipulate the calendar by changing month, year, and date. In the lower pane, observe how the logs, events, and property change notifications are fired by the control as you manipulate it.</p></li></ol></div><h4 class="subHeading">To change the control's properties</h4><div class="subSection"><ol><li><p>Select the calendar control by clicking the calendar's border.</p></li><li><p>From the <b>Edit</b> menu, click <b>Properties</b>. Test Container displays the <b>Properties</b> dialog box for the control.</p></li><li><p>Using this dialog box, you can edit the properties of the control. Change the control's properties and observe the changes.</p></li><li><p>Close the <b>Properties</b> dialog box.</p></li></ol></div><h4 class="subHeading">To invoke methods on the control</h4><div class="subSection"><ol><li><p>From the <b>Control</b> menu, click <b>Invoke Methods</b>. The <b>Invoke Method</b> dialog box appears.</p></li><li><p>In the <b>Method Name</b> combo box, select <b>BackColor (PropPut)</b>.</p></li><li><p>From the<b> Parameter Type</b> combo box, select <b>VT_COLOR</b>.</p></li><li><p>Click <b>Choose Color</b>, choose a color from the color palette, and click <b>OK</b>.</p></li><li><p>In the <b>Invoke Method </b>dialog box, click <b>Invoke</b>. The background color of the calendar control changes to the color you selected in the color palette.</p></li></ol></div><p>For more information on how to use the Test Container, from the <b>Help</b> menu, click <b>Help Topics</b>.</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note </th></tr><tr><td><p>Some samples, such as this one, have not been modified to reflect the changes in the Visual C++ wizards, libraries, and compiler, but still demonstrate how to complete your desired task.</p></td></tr></table></div></div></div><div id="footer"><div class="footerLine"></div>
          © Microsoft Corporation. All rights reserved.  Send <a href="mailto:DevDocs@microsoft.com?subject=Documentation Feedback :TSTCON Sample: ActiveX Control Test Container">comments</a> about this topic to Microsoft.
      </div></div></body></html>

空文件

简介

TstCon取自VC示例库,做了少量优化调整。 微软链接: https://docs.microsoft.com/en-us/cpp/mfc/testing-properties-and-events-with-test-container?view=vs-2019 VC示例库的Git地址: https://github.com/Microsoft/VCSamples 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/eaglexmw/TstConn.git
git@gitee.com:eaglexmw/TstConn.git
eaglexmw
TstConn
TstConn
master

搜索帮助