Partager via


MFCDialogVariableExtender Interface

Provides access to a variable code element in an existing MFC dialog box.

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

Syntax

'Declaration
<GuidAttribute("3265E574-C127-47F4-B276-B3B4BE75504C")> _
Public Interface MFCDialogVariableExtender
[GuidAttribute("3265E574-C127-47F4-B276-B3B4BE75504C")]
public interface MFCDialogVariableExtender
[GuidAttribute(L"3265E574-C127-47F4-B276-B3B4BE75504C")]
public interface class MFCDialogVariableExtender
[<GuidAttribute("3265E574-C127-47F4-B276-B3B4BE75504C")>]
type MFCDialogVariableExtender =  interface end
public interface MFCDialogVariableExtender

The MFCDialogVariableExtender type exposes the following members.

Properties

  Name Description
Public property ControlID Gets the ID of the control representing the dialog member variable.
Public property IDType Gets the type of the dialog variable.

Top

Methods

  Name Description
Public method Initialize Infrastructure. Microsoft Internal Use Only.

Top

Remarks

The MFCDialogVariableExtender object represents a variable code element of an existing MFC dialog box, providing access to the properties of that variable.

Note

To retrieve the validation ranges for a specific variable in an MFC dialog box, see MFCDialogNumberVariableExtender object or MFCDialogStringVariableExtender object.

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.

See Also

Reference

Microsoft.VisualStudio.VCCodeModel Namespace