⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.htm

📁 To use the ATLTrace tool: Debug an MFC or ATL project select Start from the Debug menu. Selec
💻 HTM
字号:
<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
    SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->

<html><head><title>ATLTraceTool Sample: Displays Output of ATLTRACE2</title></head><body><h1>ATLTraceTool Sample: Displays Output of ATLTRACE2</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>The ATLTraceTool sample builds an application that specifies which <MSHelp:link keywords="467FF555-E7A5-4F94-BDD9-50EE27AB9986" tabindex="0" >ATLTRACE2</MSHelp:link> messages appear in the output window. This application, the ATL Trace Tool, displays debug trace messages in the ATL and MFC sources. You can control the type and amount of messages displayed.</p><p>AtlTraceTool.exe ships in Visual Studio .NET and can be found in the Microsoft Visual Studio .NET 2003\Common7\Tools directory. AtlTraceTool.exe is also available from the <b>Tools</b> menu in the development environment.</p><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 this sample</h4><div class="subSection"><ol><li><p>Open the solution file tracetool.sln.</p></li><li><p>From the <b>Build</b> menu, click <b>Build</b>.</p></li><li><p>From the <b>Debug</b> menu, click <b>Start Without Debugging</b>.</p></li></ol></div><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note </th></tr><tr><td><p>This procedure is optional. You can use the prebuilt AtlTraceTool.exe instead if you want.</p></td></tr></table></div><h4 class="subHeading">To use ATLTraceTool.exe</h4><div class="subSection"><ol><li><p>Debug an MFC or ATL project by clicking <b>Start</b> from the <b>Debug</b> menu.</p></li><li><p>From the <b>Tools</b> menu, click <b>MFC/ATL Trace Tool</b> if it is not already running.</p></li><li><p>Expand the tree control list in the <b>Trace List</b> window. The window shows the running application, any modules within that application, and the trace categories for each module.</p></li><li><p>Customize, for each process, module, and category, which information is displayed in the output window. The <b>Trace level</b> control in the <b>Process</b> group is related to the <b>ATLTRACE2</b> level; only those <b>ATLTRACE2</b> messages with a level equal to or greater than the setting in the <b>Trace level</b> control will be displayed in the output window.</p></li><li><p>Click <b>Apply</b> to put your settings into effect.</p></li></ol></div><p>You can save your settings and load them the next time you debug the application; use the <b>Save</b> and <b>Load</b> buttons.</p></div><h1 class="heading">ATL Trace Tool User Interface</h1><div id="sectionSection1" class="seeAlsoNoToggleSection"><dl><dt><b>Trace List</b></dt><dd><p>A tree control with a list of processes that use debug ATL/MFC sources. Under each process, modules are listed and under each module, trace categories are listed.</p></dd></dl><dl><dt><b>Refresh</b></dt><dd><p>Updates the list of processes and modules under <b>Trace List</b>.</p></dd></dl><dl><dt><b>Process Group</b></dt><dd><p>Process-wide settings:</p><p><b>Trace level</b> – Equates to the trace level parameter in calls to <MSHelp:link keywords="467FF555-E7A5-4F94-BDD9-50EE27AB9986" tabindex="0" >ATLTRACE2</MSHelp:link>. Currently the ATL/MFC sources use a trace level of 0–4, where 0 is the most critical level.   </p><p><b>Enabled</b> – Enables tracing for the process.   </p><p><b>Category &amp; Function Names</b> – Includes the trace category and function name in trace messages.   </p><p><b>File Name &amp; Line No.</b> – Includes the file name and line number in trace messages. </p></dd></dl><dl><dt><b>Module Group</b></dt><dd><p>You must first select a module in the <b>Trace List</b> tree control before this group is enabled. These settings affect the module.</p><p><b>Trace level</b> – Equates to the trace level parameter in calls to <b>ATLTRACE2</b>. Currently the ATL/MFC sources use a trace level of 0–4, where 0 is the most critical.   </p><p><b>Inherit from Process</b> – Allows trace settings in the <b>Process</b> group to also be used for this module.   </p><p><b>Enabled</b> – Enables tracing for this module.   </p><p><b>Disabled</b> – Disables tracing for this module. </p></dd></dl><dl><dt><b>Category Group</b></dt><dd><p>You must first select a category in the <b>Trace List</b> tree control before this group is enabled. These settings affect the category within the module.</p><p><b>Trace level</b> – Equates to the trace level parameter in calls to <MSHelp:link keywords="467FF555-E7A5-4F94-BDD9-50EE27AB9986" tabindex="0" >ATLTRACE2</MSHelp:link>. Currently the ATL/MFC sources use a trace level of 0–4, where 0 is the most critical.   </p><p><b>Inherit from Module</b> – Allows trace settings in the <b>Module</b> group to also be used for this category.   </p><p><b>Enabled</b> – Enables tracing for this category.   </p><p><b>Disabled</b> – Disables tracing for this category. </p></dd></dl><dl><dt><b>Save</b></dt><dd><p>Saves settings for the current process and all modules under it to a .trc file. The .trc file can be loaded by using the <b>Load</b> button or by calling <MSHelp:link keywords="22E14418-1C47-4E45-8A01-DA3CCC6F438E" tabindex="0" >AtlTraceLoadSettings</MSHelp:link> from the project. If the .trc file is located in the same directory as the EXE/DLL, you can call <b>AtlTraceLoadSettings</b> and pass a NULL for the file name.</p></dd></dl><dl><dt><b>Load</b></dt><dd><p>Loads a .trc file.</p></dd></dl><dl><dt><b>Apply</b></dt><dd><p>Applies the current settings to the loaded process.</p></dd></dl><dl><dt><b>Close</b></dt><dd><p>Closes the <b>ATL/MFC Trace Tool</b> dialog box. Changes will not take effect unless <b>Apply</b> was selected.</p></dd></dl><dl><dt><b>Help</b></dt><dd><p>Displays help.</p></dd></dl></div></div><div id="footer"><div class="footerLine"></div>
          © Microsoft Corporation. All rights reserved.  Send <a href="mailto:DevDocs@microsoft.com?subject=Documentation Feedback :ATLTraceTool Sample: Displays Output of ATLTRACE2">comments</a> about this topic to Microsoft.
      </div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -