VCCodeMacro - интерфейс
An object representing a macro (#define statement) code element in the source code of a solution.
Пространство имен: Microsoft.VisualStudio.VCCodeModel
Сборка: Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)
Синтаксис
'Декларация
<GuidAttribute("17730D49-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeMacro
'Применение
Dim instance As VCCodeMacro
[GuidAttribute("17730D49-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeMacro
[GuidAttribute(L"17730D49-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeMacro
public interface VCCodeMacro
Заметки
The VCCodeMacroobject represents the #define code element. Primarily, the object is used to access or modify the elements of an existing macro.
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
Примеры
This example retrieves the first VCCodeMacro object of the current solution and displays it in a message box. It assumes a default MFC project is open.
Sub GetFirstMacro()
Dim vcCM As VCCodeModel
Dim vcMacro As VCCodeMacro
vcCM = DTE.Solution.Item(1).CodeModel
vcMacro = vcCM.Macros.Item(1)
MsgBox(vcMacro.DisplayName)
End Sub