This documentation is archived and is not being maintained.

VCCodeMap Object

Visual Studio .NET 2003

An object representing a map code element in the source code of a solution.

[Visual Basic .NET]
Public Interface VCCodeMap
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeMap
[C++]
interface VCCodeMap : IDispatch
[C#]
public interface VCCodeMap : IDispatch
[JScript .NET]
public interface VCCodeMap extends IDispatch

Remarks

The main purpose of the VCCodeMap object is to modify an existing map element. Modifications include adding and removing map entries and modifying the properties of existing map entries.

A map element is any code element beginning with a BEGIN_XXX_MAP macro and ending with a END_XXX_MAP macro. Some common examples are:

  • Message maps

    Beginning with BEGIN_MESSAGE_MAP)

  • Event maps

    Beginning with BEGIN_EVENT_MAP)

  • Property maps

    Beginning with BEGIN_PROPERTY_MAP)

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

This example retrieves the first VCCodeMap object of the current solution and displays it in a message box. It assumes a default MFC project is open.

Sub GetFirstMap()
    Dim vcCM As VCCodeModel
    Dim vcMap As VCCodeMap
    vcCM = DTE.Solution.Item(1).CodeModel
    vcMap = vcCM.Maps.Item(1)
    MsgBox(vcMap.DisplayName)
End Sub

See Also

VCCodeMap Object Properties, Methods, and Events | Visual C++ Extensibility Object Model

Show: