Compartilhar via


MFCDialogVariableExtender Interface

Definition

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

public interface class MFCDialogVariableExtender
public interface class MFCDialogVariableExtender
__interface MFCDialogVariableExtender
[System.Runtime.InteropServices.Guid("72E90DA0-4D00-4FA7-AE6E-DF9AB9CCF57B")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
public interface MFCDialogVariableExtender
[<System.Runtime.InteropServices.Guid("72E90DA0-4D00-4FA7-AE6E-DF9AB9CCF57B")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
type MFCDialogVariableExtender = interface
Public Interface MFCDialogVariableExtender
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.

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.

Properties

ControlID

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

IDType

Gets the type of the dialog variable.

Methods

Initialize(Object, IExtenderSite, Int32)

Microsoft Internal Use Only.

Applies to