zoukankan      html  css  js  c++  java
  • Automating tasks in Visual C++ By Macro

    [MSDN]

    Objects and the Object Hierarchy

    Home Page (Objects)OverviewFAQReference

    You can control the Visual C++ Developer Studio environment programmatically by manipulating it through Automation (formerly OLE Automation). For example, in a VBScript macro, you can control an open document by manipulating its corresponding Document object.

    Each Developer Studio object implements a dual interface through which you can manipulate the object. Each object implements an IDispatch interface for Automation and a Component Object Model (COM) interface for direct access to object members (properties, methods, events).

    Add-ins written in Visual C++ versions 5.0 or later, or Visual Basic versions 4.0 or later can employ early binding by using the COM interface. Early binding makes all calls into interface members faster at run time.

    Overview of Each Developer Studio Object

    Each Developer Studio object is described below.

    Object Represents
    Application The Developer Studio (environment for Visual C++) application.
    Breakpoint A breakpoint, which is used for debugging purposes.
    Breakpoints All the breakpoints set during a Developer Studio session.
    BuildProject A project that contains build (configuration) information.
    Configuration A set of settings to use for building a project.
    Configurations All configurations in a project.
    Debugger Enables you to inspect the execution of processes in the application in Developer Studio.
    Document An open document.
    Documents All open documents; a collection of one or more Document and TextDocument objects.
    Project A group of related files.
    Projects All projects in the currently open workspace.
    TextDocument An open text file.
    TextEditor The Developer Studio text editor.
    TextSelection Selected text in an open text document.
    TextWindow A view of an open text file.
    Window A multiple document interface (MDI) client window in which a document is being edited.
    Windows A collection of windows; all open windows.

    The Developer Studio Object Hierarchy for Automation

    To manipulate Developer Studio objects, you must know the relationships between them. The Application object is at the top, and the other objects are subordinate to it. This relationship allows you to directly access objects subordinate to the Application object by using the properties and methods of the Application object.

    The "has-a" tree is shown below. For example, the Breakpoints object has, as one of its properties, a Breakpoint object.

    Application
       Application (Application is its own parent)
           Projects
               Project
                   Configurations
                       Configuration
                           Configurations (circular)
           Documents
               Document
                   Window (for "Generic" window types)
               TextDocument
                   TextSelection
                   TextWindow
                   Window (for "Text" window types)
           TextEditor
           Windows
           Debugger
           Breakpoints
               Breakpoint
  • 相关阅读:
    Swift实现单例
    UIViewContentMode说明
    打开或关闭Mac的隐藏文件的命令。
    struts2-2.3.20以上版本无法正常启动
    eclipse下导入jdk源码
    js 与css script
    eclipse导入jquery包后报错
    ${pageContext.request.contextPath} :JSP取得绝对路径方法
    小米暑期实习在线笔试2015-04-25
    android动态污点分析
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1437605.html
Copyright © 2011-2022 走看看