代码拉取完成,页面将自动刷新
<!--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>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。