MFCDialogVariableExtender Interface

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)

public interface MFCDialogVariableExtender


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


Gets the type of the dialog variable.

System_CAPS_pubmethodInitialize(Object, IExtenderSite, Int32)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.

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


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

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
End Sub

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

Return to top
© 2016 Microsoft