Partager via


MFCDialogVariableExtender.ControlID Property

Definition

Gets the ID of the control representing the dialog member variable.

public:
 property System::String ^ ControlID { System::String ^ get(); };
public:
 property Platform::String ^ ControlID { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(1)]
public string ControlID { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.ControlID : string
Public ReadOnly Property ControlID As String

Property Value

A string representing the control ID.

Attributes

Examples

This example displays the control ID representing each variable of the dialog box implemented by the CAboutDlg class.

' Macro code.  
Sub GetControlIDs()  
    Dim vcCM as VCCodeModel  
    Dim vcClass as VCCodeClass  
    Dim mfcVar as VCCodeVariable  
    vcCM = DTE.Solution.Item(1).CodeModel  
    vcClass = vcCM.Classes.Find("CAboutDlg")  
    For Each vcVar in vcCM.Variables  
        MsgBox(vcVar.Extender("MFCDialogVariable").ControlID)  
    Next  
End Sub  

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

Applies to