Freigeben über


VCCodeModel.DialogClasses[String] Property

Definition

Gets a collection of dialog classes.

public:
 property EnvDTE::CodeElements ^ DialogClasses[System::String ^] { EnvDTE::CodeElements ^ get(System::String ^ Filter); };
[System.Runtime.InteropServices.DispId(563)]
public EnvDTE.CodeElements DialogClasses[string Filter = ""] { [System.Runtime.InteropServices.DispId(563)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(563)>]
[<get: System.Runtime.InteropServices.DispId(563)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.DialogClasses(string) : EnvDTE.CodeElements
Public ReadOnly Property DialogClasses(Optional Filter As String = "") As CodeElements

Parameters

Filter
String

Optional. If supplied, this returns only those dialog classes whose resource ID matches the value of Filter.

Property Value

A CodeElements collection.

Attributes

Examples

This example adds a comment to all dialog classes in the project.

Sub AddCommentToDialogClasses()  
    Dim codeModel As VCCodeModel  
    codeModel = DTE.Solution.Item(1).CodeModel  
    Dim codeClass As VCCodeClass  
    For Each codeClass In codeModel.DialogClasses  
        codeClass.Comment += " This is a Dialog class"  
    Next  
End Sub  

Remarks

DialogClasses[] returns the dialog classes found in the VCCodeModel object. If a filter is used, only classes that match the specified resource ID are returned.

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Applies to